W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2004

[whatwg] doctype parsing

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 22 Aug 2004 11:15:00 +0000 (UTC)
Message-ID: <Pine.LNX.4.61.0408221111080.20869@dhalsim.dreamhost.com>
On Sun, 1 Aug 2004, Olav Junker [iso-8859-1] Kj?r wrote:
>
> Is comments allowed before the doctype in HTML? In MSIE, a strict 
> doctype preceded by a comment will not trigger standards mode, but in 
> Mozilla it will. From the HTML 4 spec, its not clear whether comments is 
> allowed before the doctype. (Of course this must be defined somewhere in 
> SGML, but is seems that with XHTML appendix C, HTML has officially cut 
> its ties to SGML?)

Good question. Does anyone have a copy of Goldfarb who can answer this?


> If comments is allowed before the doctype, it enables an ugly but useful
> hack in IE: with the WHATWG doctype, a document is rendered in standard
> mode, however if a comment precedes the doctype, the document is rendered
> in quirks mode. This might be useful if legacy pages is upgraded to WF2.

I guess we should just allow it (and not mention anything in the specs).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 22 August 2004 04:15:00 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:36 UTC