Versions
| Version | Published | Notes |
|---|---|---|
| HTML 2.0 | 1995, RFC 1866 | The first standard |
| HTML 3.2 | 1997, W3C | Tables, applets, text flow around images |
| HTML 4.0 | 1997, W3C | Style sheets, scripting, Strict and Transitional and Frameset flavours |
| HTML 4.01 | 1999, W3C | Corrections to 4.0 |
| XHTML 1.0 | 2000, W3C | HTML 4.01 reformulated in XML |
| XHTML 1.1 | 2001, W3C | Modular XHTML |
| HTML5 | 2014, W3C | Snapshot of WHATWG’s work; new semantics and the parsing algorithm |
| HTML Living Standard | Since 2004, WHATWG | Maintained continuously; there are no version numbers |
All of these files are read by the same parser, whatever their DOCTYPE says; the
DOCTYPE affects only the rendering mode. XHTML 1.x files served as
application/xhtml+xml go to an XML
parser instead.
Document types
| Public identifier | System identifier | Version |
|---|---|---|
<!DOCTYPE html> | HTML (Living Standard, HTML5) | |
<!DOCTYPE html SYSTEM "about:legacy-compat"> | HTML5, for tools that need a system identifier | |
-//IETF//DTD HTML 2.0//EN | HTML 2.0 | |
-//W3C//DTD HTML 3.2 Final//EN | HTML 3.2 | |
-//W3C//DTD HTML 4.01//EN | http://www.w3.org/TR/html4/strict.dtd | HTML 4.01 Strict |
-//W3C//DTD HTML 4.01 Transitional//EN | http://www.w3.org/TR/html4/loose.dtd | HTML 4.01 Transitional |
-//W3C//DTD HTML 4.01 Frameset//EN | http://www.w3.org/TR/html4/frameset.dtd | HTML 4.01 Frameset |
-//W3C//DTD HTML 4.0//EN, …Transitional…, …Frameset… | HTML 4.0 | |
-//W3C//DTD XHTML 1.0 Strict//EN | http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd | XHTML 1.0 Strict |
-//W3C//DTD XHTML 1.0 Transitional//EN | …/xhtml1-transitional.dtd | XHTML 1.0 Transitional |
-//W3C//DTD XHTML 1.0 Frameset//EN | …/xhtml1-frameset.dtd | XHTML 1.0 Frameset |
-//W3C//DTD XHTML 1.1//EN | http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd | XHTML 1.1 |
Quirks modes
The DOCTYPE selects one of three rendering modes:
| Mode | Given by |
|---|---|
| No-quirks | <!DOCTYPE html>, the legacy-compat form, or an unknown modern doctype |
| Limited-quirks | XHTML 1.0 Transitional and Frameset; HTML 4.01 Transitional and Frameset with a system identifier |
| Quirks | No DOCTYPE at all; a DOCTYPE with a name other than html; a force-quirks token from a malformed DOCTYPE; about 60 older public identifier prefixes, including HTML 2.0, 3.2, 4.0 Transitional and Frameset, and 4.01 Transitional and Frameset with no system identifier |
In quirks mode, the only effect on parsing itself is that a table start tag
does not close an open p. The others are layout differences.
Obsolete features
Authors must not use the obsolete elements, but the parser still gives them meaning:
frame and frameset replace the body, font,
center, big, strike and tt are ordinary
or formatting elements, nobr has its own closing rules, and
plaintext switches the tokenizer to its PLAINTEXT state. The
elements page lists them all. Long
ago the parser also recognised isindex and rewrote it into a form; the
standard has since removed that.