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

andynic wrote:

> I am developing a simple HTML script.

There is no such thing.

> In one of the class definitions I had a comment line like this – note
> the incorrect closing characters:
> /* comment /*

Anything inside a <style> element (not tag) is transparent to HTML parsing, 
except for end tags and possibly (depending on HTML version) constructs that 
begin with "&".

In particular, any internal structure of a style sheet language, including 
its comment conventions, is outside the scope of markup validation.

> The heading in the script is:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Though valid, it is incorrect (in the sense of violating HTML specs). It 
also triggers "Quirks Mode" in popular browsers, see 
http://www.cs.tut.fi/~jkorpela/quirks-mode.html

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

Received on Tuesday, 24 February 2009 18:48:04 UTC