W3C home > Mailing lists > Public > www-validator@w3.org > October 2002

Re: HTML validator indicates false positives?

From: Terje Bless <link@pobox.com>
Date: Fri, 25 Oct 2002 02:00:16 +0200
To: W3C Validator <www-validator@w3.org>
cc: nex@o-slash.org
Message-ID: <a01060005-1021-BE672E36E7AC11D6AC5400039300CF5C@[193.157.66.10]>

nex@o-slash.org wrote:

>when i validated the project antville site [1] with the HTML validator,
>it found more errors than there really are [2]. it seemingly failed to
>recognize a few opening tags. e.g. consider the first ten lines of the
>document: [...]
>
>6: <link rel="alternate" type="text/xml" title="XML"
>         href="http://project.antville.org/rss10" />
>[...]
>looking at this, i cannot explain this error message:
>>Line 10, column 6: Error: end tag for element "HEAD" which is not open;
>>try removing the end tag or check for improper nesting of elements

You are using X(HT)ML syntax in a HTML 4.01 Transitional document. These do
not mic well. In particular, the "/" at the end of your "link" element
terminates the element leaving the ">" as character data. Since character
data is not allowed in the "<head>" section, this will implicitly terminate
the "head" section and open the "body" section. Thus, when it gets to your
"</head>" it notices that the "head" section has already been closed and
complains that it found an "end tag for element "HEAD" which is not open".

Simple, huh? :-)

-- 
"Temper Temper! Mr. Dre? Mr. NWA? Mr. AK, comin´
 straight outta Compton and y'all better make way?"            -- eminem
Received on Thursday, 24 October 2002 20:06:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:04 GMT