See exactly which HTML standard a page declares, and whether browsers will render it in Standards, Almost Standards, or Quirks Mode.
| Doctype | Rendering Mode |
|---|---|
HTML5 (<!DOCTYPE html>) | Standards |
| HTML 4.01 Strict | Standards |
| XHTML 1.0 Strict | Standards |
| XHTML 1.1 | Standards |
| HTML 4.01 Transitional / Frameset (with DTD URL) | Almost Standards |
| XHTML 1.0 Transitional / Frameset | Almost Standards |
| HTML 4.01 Transitional / Frameset (no DTD URL) | Quirks |
| HTML 3.2, HTML 2.0, or no doctype at all | Quirks |
Standards Mode renders the page according to the modern CSS specification - the box model, layout, and sizing behave exactly as documented.
Almost Standards Mode is nearly identical to Standards Mode, with one legacy exception involving how table cells size images vertically. In practice it behaves like Standards Mode for almost everything else.
Quirks Mode emulates old, non-standard browser behavior from the late 1990s - box model sizing, font sizing, and various CSS behaviors differ from the spec, which can cause layouts to render inconsistently across browsers. Modern sites should always use the simple <!DOCTYPE html> declaration to guarantee Standards Mode.