Re: Problems in validating '<noscript>'

John Fairweather wrote:

> Thanks, I will try your solutions, but in the meantime here is the
> URL - http://www.surreytt.co.uk/temp/Enter_STTA.html.

Thanks, my guess was correct (the error message is 'document type does not 
allow element "NOSCRIPT" here; missing one of "APPLET", "OBJECT", "MAP", 
"IFRAME", "BUTTON" start-tag'), but I could not have guessed the specifics: 
in this case, the reason for the error message is that the <noscript> 
element appears inside an <h3> element. This is forbidden by HTML syntax. 
(An <h3> element may contain inline elements, i.e. text-level elements, 
only. A <noscript> element is by definition, and for no good reason, but 
still, a block element.)

Removing the <h3> markup is the obvious solution. In addition to causing the 
validation technicality, such markup is rather illogical, since the content 
is not a heading for anything.

> Note - Statcounter code is automatically generated from
> statcounter.com.

Well, that's a different story. Your document contains

<script type="text/javascript"
src="http://www.statcounter.com/counter/counter.js"></script>

which causes, when client-side scripting is allowed and the designated 
resource is available, the browser to fetch and execute JavaScript code from 
the external source. But this is external to validation. A validator simply 
checks the syntax of that <script> element and does not fetch any code, 
still less run it.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

Received on Saturday, 18 July 2009 10:49:46 UTC