Re: Validator does not properly check comments within <style> tag

On Tue, 24 Feb 2009, Jukka K. Korpela wrote:

> Anything inside a <style> element (not tag) is transparent to HTML parsing,

Most web authors don't realize that this is wrong for XHTML, which
they prefer to HTML (but don't know why).

It bothers me that  http://jigsaw.w3.org/css-validator/
makes a difference depending on Content-Type.
It does not find any styles in
 http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.xhtml
but it does find styles in
 http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.html

However,  http://www.w3.org/TR/xhtml1/#C_4
and  http://www.w3.org/TR/xhtml1/#h-4.8  make no difference
for Content-Type if I'm not mistaken.


My conclusion:

The CSS validator should at least include a warning about "comments"
when finding
   <style type="text/css">
   <!--


/* Of course it is incredibly stupid by authors to write XHTML
but use constructs that were necessary for Netscape 2! */

Received on Wednesday, 25 February 2009 15:54:18 UTC