W3C home > Mailing lists > Public > www-validator@w3.org > February 2009

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

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 24 Feb 2009 20:47:12 +0200
Message-ID: <6F7E48A4AB1D4400AB90B7C12AC77A07@JukanPC>
To: <andynic_nl@yahoo.com>, <www-validator@w3.org>
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 GMT

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