HTML4 and the XHTML detour
Permalink:The World Wide Web Consortium (W3C) published HTML 4.01 as a Recommendation in December 1999.
The specification's Strict document type left out deprecated presentation features such as the font element.
Transitional let authors keep them as they moved toward CSS.
The third type, Frameset, was for pages that split the browser window into frames.
Each frame held its own document.
A page with blue body text could keep the same appearance.
The color moved out of repeated font tags and into a stylesheet.
Then came XHTML 1.0, published by the W3C in January 2000.
It reformulated HTML 4 in XML.
Writing it meant following XML syntax rules.
You had to quote attribute values, close elements, and write names in lowercase.
The familiar <br /> spelling came from writing an empty element in XML syntax.
It did not tell a browser by itself to switch to an XML parser.
The response's media type determined which parser the browser used.
A compatible XHTML 1.0 page could be served as text/html.
Browsers then used their HTML parser.
A page served as application/xhtml+xml used XML processing.
There a mismatched tag is a well-formedness error.
The browser can stop displaying the page normally.
If you only tested the first version and saw a page, that did not prove the same file would work when served as XML.
XHTML 2 was a separate W3C effort to change the language further. It never became a W3C Recommendation. For people building ordinary sites, the open question was how to improve HTML without asking them to rewrite working pages.
The WHATWG split
Permalink:The history section of the HTML Living Standard traces the split to a W3C workshop in 2004. A proposal to extend HTML and its document model for web applications was rejected. Work centered on XML continued instead. People from Apple, Mozilla, and Opera formed the Web Hypertext Application Technology Working Group, or WHATWG. They kept working on HTML outside the W3C process. Their approach started from what browsers and sites already did. It aimed to make browser behavior more consistent.
That approach mattered if you had to keep a form working on an old site. You also had to make the next version easier to build. The browser could keep handling the old page. Authors and browser makers gained a common description of how newer form controls and existing markup should behave. Writing that description meant spelling out what browsers do with bad input. It was not enough to describe the pages authors ought to write.
In 2007, the W3C began a new HTML working group. For a time the groups worked from a shared specification. Their publication goals later diverged. The W3C wanted a completed Recommendation. The WHATWG kept updating a living specification. The W3C published HTML5 as a Recommendation in October 2014. That date marks a standards publication. It does not mean every browser added every feature that month. It does not mean work on HTML stopped then.
What HTML5 actually changed
Permalink:The first line of a modern HTML document can be <!doctype html>.
It tells browsers to use standards mode, their rules for rendering modern pages.
It is not the compatibility mode used for some old markup.
There is no number to increment in that line for a new HTML release.
For comparison, here is an HTML 4.01 Strict document followed by a modern version of the same notice.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>Library notice</title>
</head>
<body>
<div id="content">
<h1>Oak Street entrance closed</h1>
<p>Use the courtyard entrance today.</p>
</div>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Library notice</title>
</head>
<body>
<main id="content">
<h1>Oak Street entrance closed</h1>
<p>Use the courtyard entrance today.</p>
</main>
</body>
</html>
Save the samples as separate files and open them in a browser.
Both give you the same notice.
Both keep id="content", so an existing link to #content still has a target.
In the modern document, main also identifies the page's main content as a landmark for assistive technology.
The shorter encoding declaration tells the browser to read the new file as UTF-8.
Save it in that encoding so the declaration and file agree.
HTML5 brought elements such as nav and article to describe structure.
It added audio and video for media.
Browsers could play supported formats without a separate plug-in.
A library could use video for its tour, but someone still had to provide captions and test playback.
New input types such as email let the browser check the shape of an address in a form.
That does not prove the mailbox exists.
The less visible change was the parsing algorithm.
That is the set of steps browsers use to turn source text into a document tree.
For example, a list may start before an open paragraph is closed.
The HTML parser ends the paragraph when it reaches the list.
Leaving out the </p> before the list is allowed in that case.
But writing it after the list would leave a stray end tag.
The parsing rules cover both cases, including what a browser must do when a tag is out of place.
The Living Standard today
Permalink:In 2019, the W3C and WHATWG signed a memorandum of understanding. They agreed to collaborate on a single version of HTML and the Document Object Model, or DOM. The WHATWG HTML Living Standard is the ongoing specification. Use its sections on syntax and elements to check an HTML rule today. Use the dated W3C Recommendations when you need to know what a particular release said. The DOM represents a page as a tree and provides the interfaces that scripts use to inspect or change it.
Authors still say "HTML5" when they mean modern HTML, especially in older tutorials. If a tutorial describes a feature as new, check which browsers your readers use before relying on it. A feature's place in the specification describes how it should work. Browser support decides whether you can use it for a task today without a fallback.
If you are updating an old site, try the short doctype and modern markup on a copy first. A switch away from a doctype that triggered quirks mode can change the layout. This happens even if you leave the visible text alone. Check links to existing headings, compare layout at different widths, and test the forms before replacing the original. If the distinction between the source file and the document tree is new, start with what HTML is. Then inspect the two samples in your browser's developer tools.
Primary sources from our archive
Permalink:The primary source in our archive is a February 2010 capture of a draft titled "HTML 4.1" by HTML4All. It records a proposal from the site's contributors, not a W3C or WHATWG publication or an official release between HTML 4.01 and HTML5. The capture keeps the draft as a historical document. Use it to see what an author was proposing. Do not use it as a reference for writing HTML now.
Read its opening paragraphs next to the table. The table separates presentation, the document's objects, parsing, and the text representation of the document. The draft calls its proposed text form "cHTML" and calls a proposed way of parsing text "tHTML parsing." It uses "HTML" in a narrower sense there. The word covers the resulting document objects. In some passages it also covers the interfaces used to change them. Those names belong to the draft and do not describe versions you need to choose between when writing a page today.
The draft's section on conformance checkers separates checks on which attributes are allowed or required from warnings about the wording of alternate text. A section on converters also warns against inventing dummy alternate text to satisfy a checker. That is a concrete point of comparison with tools today. A report can tell you when markup is missing. You still have to look at the image and decide what a reader needs to know. For more practice with current markup, return to the Learn HTML hub.