W3C home > Mailing lists > Public > www-validator@w3.org > April 2008

Re: Validating html doc

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sat, 26 Apr 2008 08:24:46 +0300
Message-ID: <002b01c8a75d$de0a4030$0500000a@DOCENDO>
To: "Fabio" <fabio@fontesarda.it>, <www-validator@w3.org>

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 

> 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")
Received on Saturday, 26 April 2008 05:25:24 UTC

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