Re: Error Message Feedback: noscript confusing nesting of <a>

On Fri, Sep 15, 2006 at 09:05:41AM -0700, Paul Kimelman wrote:
> [ I am validating my site. I have one problem I think the validator is
> wrong on, and one that I question what the XHTML goal was. The one that
> is causing trouble is:
>         <div class="thumb_img"
> 		style="background-image: url('pict.jpg');">
> 	  <noscript><a class="ns" href="#">
> 		<img src="pict.jpg" alt="" />&nbsp;&nbsp;
>                 &nbsp;&nbsp;</a>
>           </noscript>
> 	</div>
 
> The validator complains about the <a> not being in a <div>. It clearly
> is

It might be a descendent of a div, but it is a child element of a
noscript element.

 <!ELEMENT NOSCRIPT - - (%block;)+

The element called no script has a required start tag, a required end
tag, and contains one or more elements in the group "block" (which
doesn't include <a>).

> The other problem/question is why noscript is not allowed in the head.

Presumably because noscript contains content to display if scripting
isn't available, and you can't put content in the head section, but
that's a question for the HTML working group rather then people
involved in QA.

-- 
David Dorward                                      http://dorward.me.uk

Received on Saturday, 16 September 2006 01:01:21 UTC