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

Future of DOCTYPEs and QuirksMode

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Wed, 17 Feb 2010 03:40:09 +0100
To: www-validator@w3.org
Message-ID: <20100217034009082768.41ddea80@xn--mlform-iua.no>
Jukka K. Korpela, Fri, 12 Feb 2010 06:17:49 +0200:
> now I vaguely remember why I haven't used this nicer approach),
> web browsers have never followed HTML specifications properly. 
> [...] they use simple string  patterns to make a choice between
> rendering modes (like Quirks and  "standard").

In HTML5, QuirksMode is being defined as the default mode. What are the 
consequences for new DTDs and also amendments to the DTD caused by this?

I have a suspicion that this is being used by some of the big browser 
vendors to trigger QuirksMode if you modify the Doctype the way that 
Jukka explained. Here is my proof: 

During the last days I used Jukka's "nicer approach" to add 'myattr' to 
the strict DOCTYPE:

	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
	[<!ATTLIST P myattr CDATA #implied  >]> 

I discovered:

a) that the ATTLIST addition does _NOT_ trigger quirks mode in
   released Firefox, IE or Opera or Konqueror
b) that the "]>" which Firefox displays _can_ be hidden, 
    via some comment hacks:

	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
	[<!ATTLIST P myattr   CDATA #implied --><!><!-- >]>
 
	BUT

c) In Safari the above DOCTYPE variant _DOES_ trigger quirks mode.
   I found a way to override that. However, the point I want to
   make here is that this has to be a fairly new decision by 
   the Webkit/Safari developers, as the same doctype amendment
    does not trigger quirks in Konqueror!
  
d) NEW DEVELOPEMENT: In Opera 10.5 beta (released some days ago)
   the above also triggers quirks mode.

This means that DTDs that formerly standards mode doctypes now begins 
to trigger quirks mode, rendering DTDs impossible to use for anything 
on text/HTML Web.
-- 
leif halvard silli
Received on Wednesday, 17 February 2010 02:40:44 GMT

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