Tabular overview on doctype switching in current browsers

Preface

"The Label specifies the unique name of the DTD, and can be appended with the version number of the DTD. The Definition specifies the definition of the DTD that is specified in the Label. The URL specifies the location of the DTD. There are three Definitions specified in the HTML 4.0 specification - Frameset, Transitional, and Strict. Frameset is used for FRAMESET documents. Transitional contains everything except FRAMESET documents, and Strict, according to the HTML 4.0 specification, '...excludes the presentation attributes and elements the World Wide Web Consortium (W3C) expects to phase out as support for style sheets matures.' "

(From: http://msdn.microsoft.com/workshop/author/css/overview/cssenhancements.asp).

For resources and more links, see my document doctypeswitch.html

IEX6 public preview

(italicized items: Not confirmed yet)

Source: http://msdn.microsoft.com/workshop/author/css/overview/cssenhancements.asp, http://www.oreillynet.com/lpt/a/163

Label Definition URL present URL not present
No !DOCTYPE
present, no Version present, and all versions previous to HTML 4
Off Off
HTML 4.0 No Definition
Present
On On
HTML 4.0 Frameset On Off
HTML 4.0 Transitional On Off
HTML 4.0 Strict On On
XHTML   On On
XML   On On
Unrecognized
!DOCTYPE
  On On

IEX5 Mac

(italicized items: Not confirmed yet)

Sources: http://www.hut.fi/u/hsivonen/doctype.html, http://www.oreillynet.com/lpt/a/163.

Label Definition URL present URL not present
No !DOCTYPE
present, no Version present, and all versions previous to HTML 4

 

Off Off
HTML 4.0 No Definition
Present
On On
HTML 4.0 Frameset On Off
HTML 4.0 Transitional On Off
HTML 4.0 Strict On On
XML   On On
Unrecognized
!DOCTYPE
On On

Netscape 6

Source: http://lxr.mozilla.org/seamonkey/source/htmlparser/src/nsParser.cpp#586

Contrary to the comments in the above code, Mozilla has currently two modes: compatibility (quirk) mode and standard.

  1. compatibility-mode: behave as much like nav4 as possible (unless it's too broken to bother)
  2. standard-mode: do html as well as you can per spec, and throw out navigator quirks
Label Definition URL present URL not present
No !DOCTYPE
present, no Version present, and all versions previous to HTML 4
quirk quirk
HTML 4.0 No Definition
Present
Off Off
HTML 4.0 Frameset quirk (unless pointing to strict dtd) quirk
HTML 4.0 Transitional quirk (unless pointing to strict dtd) quirk
HTML 4.0 Strict strict strict
XHTML   On On
XML   On On
Doctype with SystemID or internal subset   strict strict

Summary

Far from complete, probably with bugs, but it's a start: Summary


© Matthias Gutfeldt, 2001. Steal the code, not the content.