Re: Validating html doc

Fabio wrote:

> Hi, (sorry for my english language)

Including the URL compensates for any English language problems. :-)

> URL to validate: http://www.fontesarda.it/animaz/index.htm

The problem is that at line 260 you start a <p> element and at line 264 
you have a <noscript> element that you mean to put inside the <p> 
element. This is not possible, since <noscript> is a block-level element 
and cannot, by HTML syntax, be contained in a <p> element.

By HTML rules, the <noscript> element implicitly closes the open <p> 
element, i.e. implies </p> before it. This makes the subsequent </p> tag 
homeless:

> HTML Validator show error: (Line 266, Column 63: end tag for element
> "P" which is not open .
> .   <br> Realizzato con JavaScript e Fogli Stile CSS</p>)

It's a design flaw in HTML that <noscript> is block-level, but it's too 
late to change that. The whole <noscript> element is usually a wrong 
approach. Instead, the document's normal content should have the "no 
scripting" alternative, so that this alternative is dynamically 
_changed_ to something else when scripting is enabled.

However, you could make a dull fix by duplicating code so that the 
<noscript> element contains the entire <p> element and similarly the 
<script> code generates the entire <p> element.


Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/ 

Received on Saturday, 26 April 2008 05:25:24 UTC