- From: David Dorward <david@dorward.me.uk>
- Date: Tue, 24 Nov 2015 16:21:27 +0000
- To: "Michał Szczygieł" <kamsmichalszczygiel@gmail.com>
- Cc: "www-validator@w3.org" <www-validator@w3.org>
Received on Tuesday, 24 November 2015 16:21:58 UTC
On 24 Nov 2015, at 11:38, Michał Szczygieł wrote:
> I have issue with "Element section not allowed as child of element a in
> this context."
>
> It is snippet of my code:
That snippet is valid.
> So it looks properly in my opinion, even specification confirms that.
The formal part of the specification says:
    Content model:
        Transparent, but there must be no interactive content descendant.
Which means that (with the exception of interact content) any element you could put in the place you have put a link, you can put inside the link.
So:
    <div><a href="..."><section></section></a></div>
… is valid because you can have a section in a div but …
    <b><a href="..."><section></section></a></b>
 
… is not because you can't have a section inside a b.
You haven't shown us what the parent element of your `a` is, but it is something that you can't put a section inside.
-- 
David Dorward
http://dorward.co.uk/
Received on Tuesday, 24 November 2015 16:21:58 UTC