W3C home > Mailing lists > Public > www-validator@w3.org > September 2006

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

From: David Dorward <david@dorward.me.uk>
Date: Sat, 16 Sep 2006 01:51:36 +0100
To: Paul Kimelman <paul@nikoosha.com>
Cc: www-validator@w3.org
Message-ID: <20060916005135.GA22049@us-lot.org>

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:58:58 UTC