Re: Validator ignores malformed closing comment tag

On 21 Sep 2009, at 00:20, Jerry Peek wrote:

> Hi, all. The page http://tucsonart.info/murals/ie_test.html wouldn't  
> display correctly in several versions of Internet Explorer, though  
> Validator reported "This document was successfully checked as HTML  
> 4.01 Transitional!" (http://validator.w3.org/, version v0.8.5, as of  
> today, 20 September 2009).
>
> I eventually found an invalid closing comment tag inside the <style>  
> block in the <head> section.

In HTML, <style> elements contain CDATA. It isn't an invalid comment,  
it is just a part of the stylesheet.

See http://dorward.me.uk/www/comments-cdata/ for the history of these.

There is nothing invalid about this, but it is something that would be  
useful for a general HTML lint to pick up.

(Please direct responses to the mailing list, and not directly to me)

-- 
David Dorward
http://dorward.me.uk

Received on Monday, 21 September 2009 08:26:48 UTC