Re: <noscript> not allowed in head ?

George Herson <gherson@snet.net>:
>
> It appears, then, that <noscript> isn't allowed in the head section

That's correct:

<!ELEMENT HEAD O O (TITLE & BASE?) +(SCRIPT|STYLE|META|LINK|OBJECT)>

(Entities resolved, comment removed.)

> If so, I think this should this be mentioned on
> http://www.w3.org/TR/html4/interact/scripts.html#edef-NOSCRIPT.

Maybe, but that document is unlikely to change ever again.

> <html><head><title>Products</title>
> <script type="text/javascript" src="page_loader.js"></script>
> <noscript>Your JavaScript is turned off.  This may cause problems
> with the shopping cart.</noscript>

It was probably not allowed for just this reason your example exhibits. You're
trying to insert text into the head element, which is not allowed -- where
would it be shown?

Btw.: It's IMHO stupid to rely on JS in a shoppping environment.

Received on Monday, 20 October 2003 11:50:10 UTC