W3C home > Mailing lists > Public > www-validator@w3.org > July 2004

Re: validation of <noscript> inside links

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Thu, 15 Jul 2004 00:19:42 +0300 (EEST)
To: Simon Anderson <simon@slop.de>
Cc: www-validator@w3.org
Message-ID: <Pine.GSO.4.58.0407150015070.6936@korppi.cs.tut.fi>

On Wed, 14 Jul 2004, Simon Anderson wrote:

> The XHTML validator flags an error if a <noscript> element is included
> inside an <a> element.

(I'm getting curious: Why would anyone want to use <noscript> inside an
<a> element?)

The validator correctly reports an error. In XHTML, as well as in classic
HTML, the <a> element is an inline element, whereas <noscript> is a block
element. There's even a DTD comment to that effect:

<!-- these can only occur at block level -->
<!ENTITY % misc "noscript | %misc.inline;">

This is just a characterization. The formal reasoning needs to be based on
the exact definition of the content model of <a> and finding out, after
expanding the entities used in the definitions, that the content model
does not permit <noscript>.

> As I read the XHTML DTD, it states that
> <noscript> is allowed here.

Where would it say so?

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 14 July 2004 17:19:45 UTC

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