This document contains suggestions of how to use the DOCTYPE declaration to determine strict mode vs. quirks mode. See bug 1312 and DetermineParseMode() in nsParser.cpp.
The following should trigger strict mode:
<!DOCTYPE HTML>
.
"-//W3C//DTD HTML 4.01//EN"
.
"-//W3C//DTD HTML 4.0//EN"
.
"-//W3C//DTD XHTML 1.0 Strict//EN"
.
"-//W3C//DTD XHTML 1.0 Transitional//EN"
.
"-//W3C//DTD XHTML 1.0 Frameset//EN"
.
"ISO/IEC 15445:1999//DTD HyperText Markup Language//EN"
.
"ISO/IEC 15445:1999//DTD HTML//EN"
.
The following should trigger quirks mode (this list must be comprehensive):
The following sites have been useful in preparing this list: W3C HTML Validator, HTMLHelp HTML Validator.
"-//W3C//DTD HTML 4.01 Transitional//EN"
.
"-//W3C//DTD HTML 4.01 Frameset//EN"
.
"-//W3C//DTD HTML 4.0 Transitional//EN"
.
"-//W3C//DTD HTML 4.0 Frameset//EN"
.
"-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//EN"
.
"-//IETF//DTD HTML//EN//3.0"
.
"-//W3O//DTD W3 HTML 3.0//EN//"
.
"-//W3O//DTD W3 HTML 3.0//EN"
.
"-//W3C//DTD HTML 3 1995-03-24//EN"
.
"-//IETF//DTD HTML 3.0//EN"
.
"-//IETF//DTD HTML 3.0//EN//"
.
"-//IETF//DTD HTML Level 3//EN"
.
"-//IETF//DTD HTML Level 3//EN//3.0"
.
"-//AS//DTD HTML 3.0 asWedit + extensions//EN"
.
"-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//EN"
.
"-//IETF//DTD HTML Strict//EN//3.0"
.
"-//W3O//DTD W3 HTML Strict 3.0//EN//"
.
"-//IETF//DTD HTML Strict Level 3//EN"
.
"-//IETF//DTD HTML Strict Level 3//EN//3.0"
.
"HTML"
.
"-//IETF//DTD HTML//EN"
.
"-//IETF//DTD HTML//EN//2.0"
.
"-//IETF//DTD HTML 2.0//EN"
.
"-//IETF//DTD HTML Level 2//EN"
.
"-//IETF//DTD HTML Level 2//EN//2.0"
.
"-//IETF//DTD HTML 2.0 Level 2//EN"
.
"-//IETF//DTD HTML Level 1//EN"
.
"-//IETF//DTD HTML Level 1//EN//2.0"
.
"-//IETF//DTD HTML 2.0 Level 1//EN"
.
"-//IETF//DTD HTML Level 0//EN"
.
"-//IETF//DTD HTML Level 0//EN//2.0"
.
"-//IETF//DTD HTML Strict//EN"
.
"-//IETF//DTD HTML Strict//EN//2.0"
.
"-//IETF//DTD HTML Strict Level 2//EN"
.
"-//IETF//DTD HTML Strict Level 2//EN//2.0"
.
"-//IETF//DTD HTML 2.0 Strict//EN"
.
"-//IETF//DTD HTML 2.0 Strict Level 2//EN"
.
"-//IETF//DTD HTML Strict Level 1//EN"
.
"-//IETF//DTD HTML Strict Level 1//EN//2.0"
.
"-//IETF//DTD HTML 2.0 Strict Level 1//EN"
.
"-//IETF//DTD HTML Strict Level 0//EN"
.
"-//IETF//DTD HTML Strict Level 0//EN//2.0"
.
"-//WebTechs//DTD Mozilla HTML//EN"
.
"-//WebTechs//DTD Mozilla HTML 2.0//EN"
.
"-//Netscape Comm. Corp.//DTD HTML//EN"
.
"-//Netscape Comm. Corp.//DTD HTML//EN"
.
"-//Netscape Comm. Corp.//DTD Strict HTML//EN"
.
"-//Microsoft//DTD Internet Explorer 2.0 HTML//EN"
.
"-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//EN"
.
"-//Microsoft//DTD Internet Explorer 2.0 Tables//EN"
.
"-//Microsoft//DTD Internet Explorer 3.0 HTML//EN"
.
"-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//EN"
.
"-//Microsoft//DTD Internet Explorer 3.0 Tables//EN"
.
"-//Sun Microsystems Corp.//DTD HotJava HTML//EN"
.
"-//Sun Microsystems Corp.//DTD HotJava Strict HTML//EN"
.
"-//IETF//DTD HTML 2.1E//EN"
.
"-//O'Reilly and Associates//DTD HTML Extended 1.0//EN"
.
"-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0//EN"
.
"-//O'Reilly and Associates//DTD HTML 2.0//EN"
.
"-//SQ//DTD HTML 2.0 HoTMetaL + extensions//EN"
.
"-//Spyglass//DTD HTML 2.0 Extended//EN"
.
"+//Silmaril//DTD HTML Pro v0r11 19970101//EN"
.
"-//W3C//DTD HTML Experimental 19960712//EN"
.
"-//W3C//DTD HTML 3.2//EN"
.
"-//W3C//DTD HTML 3.2 Final//EN"
.
"-//W3C//DTD HTML 3.2 Draft//EN"
.
"-//W3C//DTD HTML Experimental 970421//EN"
.
"-//W3C//DTD HTML 3.2S Draft//EN"
.
"-//IETF//DTD HTML i18n//EN"
.
(Back to David Baron)