Three variants controlled which features were allowed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">The dominant layout technique before CSS — deeply nested tables for columns and spacing.
font, bgcolor, align, border mixed structure with presentation.
<font face="Arial" color="red">Text</font>Basic input types (text, checkbox, radio, select, textarea), form actions and methods.
All tags must be closed, attributes quoted, elements lowercase. Stricter authoring than HTML 4.
<!-- XHTML requires closing slash on void elements --><br /><img src="photo.jpg" alt="Photo" />Most XHTML 1.0 pages were served with the HTML MIME type, processed by the HTML parser.
The doctype triggers standards mode and is not versioned.
<!DOCTYPE html>New structural elements: header, nav, main, article, section, aside, footer, figure, figcaption.
<main> <article> <header><h1>Title</h1></header> <section>Content</section> <footer>Byline</footer> </article></main>video and audio elements with source fallbacks — no Flash plugin needed.
<video controls> <source src="clip.mp4" type="video/mp4" /></video>2D drawing surface via JavaScript. Foundation for games, data visualizations, and image editing.
<canvas id="c" width="300" height="150"></canvas>email, number, date, range, color, search, url, tel with native validation.
<input type="email" required /><input type="range" min="0" max="100" />Client-side key-value storage as a replacement for cookies.
localStorage.setItem('theme', 'dark');Run scripts on background threads to avoid blocking the main thread.
const worker = new Worker('worker.js');data-* attributes store extra information on elements without custom attributes.
<li data-id="42" data-category="fruit">Apple</li>Native disclosure widget without JavaScript.
<details><summary>More info</summary><p>...</p></details>Art direction for responsive images — different source files per media condition.
<picture> <source media="(max-width: 600px)" srcset="sm.jpg" /> <img src="lg.jpg" alt="..." /></picture>Hidden attribute promotion, additional input attributes, fieldset improvements.
Context menu elements (later removed from spec).
Native modal and non-modal dialog with built-in focus management and ::backdrop.
<dialog id="modal"> <p>Content</p> <form method="dialog"><button>Close</button></form></dialog>Browser-native checkout flow integrated with the HTML spec.
Multiple <main> elements allowed if only one is visible at a time.
WHATWG publishes HTML as a living standard with no version numbers — changes ship continuously.
Native lazy loading for images and iframes.
<img src="large.jpg" loading="lazy" alt="..." />Hints the browser to decode images off the main thread.
<img src="photo.jpg" decoding="async" alt="..." />Hint the browser about the relative priority of a resource (high, low, auto).
<img src="hero.jpg" fetchpriority="high" alt="Hero image" />Declarative popover behavior without JavaScript — toggle, show, hide via HTML attributes.
<button popovertarget="menu">Open</button><div id="menu" popover>Popover content</div>