W3C home > Mailing lists > Public > www-validator@w3.org > November 2015

Element section not allowed as child of element a in this context.

From: Michał Szczygieł <kamsmichalszczygiel@gmail.com>
Date: Tue, 24 Nov 2015 11:38:34 +0000
Message-ID: <CAF-g-_rMQ2X4AbGSTqNxzj0vTwrQttR0j8xx1WA-Sx-L-k41Yw@mail.gmail.com>
To: "www-validator@w3.org" <www-validator@w3.org>
To Whom It May Concern

I have issue with "Element section not allowed as child of element a in
this context."

It is snippet of my code:

             <a href="p3058,piton-clear.html" title="PITON CLEAR">
                <div class="name-wrapper">PITON CLEAR</div>

So it looks properly in my opinion, even specification confirms that.

“The a element may be wrapped around entire paragraphs, lists, tables, and
so forth, even entire sections, so long as there is no interactive content
(e.g. buttons or other links). This example shows how this can be used to
make an entire advertising block into a link:

<aside class="advertising">
<a href="http://ad.example.com/?adid=1929&amp;pubid=1422">
<h1>Mellblomatic 9000!</h1>
<p>Turn all your widgets into mellbloms!</p>
<p>Only $9.99 plus shipping and handling.</p>

<a href="http://ad.example.com/?adid=375&amp;pubid=1422">
<h1>The Mellblom Browser</h1>
<p>Web browsing at the speed of light.</p>
<p>No other browser goes faster!</p>

</aside>“ (

But w3c  Markup Validation Service does not agree with with this.

Error: Element section not allowed as child of element a in this context.
(Suppressing further errors from this subtree.) From line 1916, column 26;
to line 1916, column 34
<section>↩Contexts in which element section may be used:
Where flow content is expected.
Content model for element a:
Transparent, but there must be no interactive content descendant.

Could you explain me what is wrong?
Thank you in advance for your attention to this matter.

Yours faithfully,
Michał Szczygieł
Z wyrazami szacunku,
Michał Szczygieł
Received on Tuesday, 24 November 2015 16:09:13 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:14 UTC