Tech is political: The people under attack in Palestine 🇵🇸, Iran 🇮🇷, and Lebanon 🇱🇧 are people like us. They’re our brothers and sisters, too. Read up on their history, scrutinize what you’re told, and demand respect and accountability. Hide

Frontend Dogma

A Short History of HTML

by @pmmueller@mastodon.social on , tagged , , , , , (share this post, e.g., on Mastodon or on Bluesky)

HTML5: I’ve seen the Future—It’s in my Browser.

The Web wasn’t born on a drawing board: It grew organically over the past few decades. The same is true of HTML.

That’s why a brief look at the history of HTML helps to better understand any confusion surrounding the term.

Strictly speaking, HTML has in fact existed twice: once from the W3C and once from the WHATWG. Since May 28, 2019, the HTML standard is officially being maintained by the WHATWG—and it no longer has a version number:

How that came to be is told by the following short history of HTML, which begins in the French-speaking part of Switzerland:

The figure [publisher’s note: graphics could not be translated yet] shows the first five phases and the most important keywords at a glance.

HTML5: A story in five phases.

Phase 1: HTML—Between the W3C and the Browser Vendors

While working at CERN in Geneva in the late 1980s, Tim Berners-Lee had the idea of creating a hypertext system based on the Internet, one in which documents could be accessed directly from any computer on the network. This idea was the seed of the World Wide Web.

Fortunately, Berners-Lee didn’t have his inventions patented but instead created open standards such as HTTP and HTML. Even so, from the very beginning the Web grew up in a field of tension between a variety of interests:

Somewhere in between are web designers, web developers, and ordinary users.

In principle, all parties agree that uniform standards on the Web are important in order to prevent a repeat of the Tower of Babel. In reality, however, the browser vendors very early on repeatedly took it upon themselves to introduce new HTML elements such as <table> and <font> without waiting for standardization.

1998: W3C HTML 4.0.

Back then, too, the official HTML standard lagged behind the actual state of the Web, in part merely documenting reality after the fact. So in truth, the browser vendors have always been the ones who decide what is possible on the Web, even if the official standards came from the W3C.

Phase 2: HTML 4.01 Becomes XHTML 1.0

HTML 4.0 was adopted in December 1997, and almost exactly two years later—shortly before the millennium, as a Christmas present on December 24, 1999—a slightly corrected version 4.01 arrived. The very fact that a “bugfix version” took two years suggests that the process behind the scenes wasn’t entirely unproblematic.

The average markup of web pages back then was an impenetrable conglomerate of <table> and <font>, delivered to the browsers with the MIME type text/html. The MIME type indicates what kind of content is being delivered, and for browsers, text/html means, simply put, “Here comes text that conforms to the rules of HTML.”

Web page markup was often produced by interested amateurs using visual editors. Neither of the two knew the rules of HTML particularly well, and both considered the appearance of the web pages in the browser more important than the markup. In practice, therefore, text/html meant to browsers something more like: “Here comes a fairly confused jumble of characters that supposedly has something to do with HTML.”

1999: Yahoo.com.

The browser vendors therefore taught their browsers to be forgiving of errors in the markup and to try, come what may, to somehow build a web page out of the muddle and display it in the browser window.

The W3C, by contrast, favored a more idealistic solution and tried to tackle the evil at its root: HTML was too imprecise, and ideally the markup of web pages should conform to the stricter rules of XML.

The first step in this direction was a reformulation of HTML 4.01 under the name XHTML 1.0. The “X” stood, roughly speaking, for “XML-based,” and the current version of XHTML 1.0 dates from August 1, 2002.

2002: W3C XHTML 1.0.

XHTML 1.0 contained no new elements or attributes—the rules just became somewhat stricter. While in HTML capitalization didn’t matter and, for example, a closing </p> was optional, XHTML mandated strict lowercase and the rule that every element had to be closed again. These stricter rules had many advantages when writing HTML and especially when learning it, but they also led to cumbersome constructs such as <br /> or checked="checked".

XHTML 1.0 was seen from almost every quarter as a largely good thing and a necessary cleanup, and together with CSS it formed a solid foundation for building web pages for many years.

Phase 3: XHTML 2.0 and the Revolt of the Browser Vendors

Over the years, the Web had evolved from its beginnings as a hypertext system for displaying simple documents into a platform for web applications. Browsers, of course, still displayed simple web pages, but interactive web applications such as Google Maps became more and more important, and browsers changed from pure document viewers into complex runtime environments.

The W3C wanted to build a solid XML-based foundation for this development and really regarded XHTML 1.0 as merely the first step on a long journey. The actual goal, in fact, was not only to introduce stricter rules, but sooner or later to enforce compliance with them. While XHTML 1.0 was usually delivered to browsers as text/html, XHTML 1.1 and 2.0 were to allow only application/xhtml+xml.

In practice, that would have had drastic consequences. While browsers are forgiving with documents delivered as text and smooth over any errors, markup delivered as application is treated like a program: at the first error, processing is aborted, and the browsers display an error message instead of the web page. This step would have meant that, then as now, an estimated 99.9% of all web pages actually in existence could no longer have been displayed.

From version 1.1 on, then, XHTML passed reality by, and accordingly it was completely ignored by the browser vendors and the public at large. As the saying goes: “Theory is when you know everything and nothing works. Practice is when everything works and nobody knows why.” The W3C wanted to, in effect, reinvent the Web and avoid the mistakes made the first time around. This time the Web was to be perfect. In theory.

In practice, one small problem stood in the way: A Web already existed. It may not have been perfect, but it worked, and it was briskly evolving into a thoroughly usable platform for web applications.

While the W3C developed the backward-incompatible XHTML 2.0, resistance among web developers and browser vendors grew ever more vocal. After the failed attempt to dissuade the W3C from its wrong path, Apple, Opera, and Mozilla founded the Web Hypertext Application Technology Working Group (WHATWG) in early summer 2004 in order to continuously develop the existing HTML standard as a platform for web applications, independently of the W3C.

2004: WHATWG.org.

Phase 4: Back to HTML—the W3C Changes Course

For two years, the W3C and the WHATWG toiled away independently at their respective ideas, until in October 2006 W3C Director Tim Berners-Lee published a remarkable blog post titled “Reinventing HTML,” which ultimately amounted to a complete about-face in the W3C’s strategy:

Making standards is hard work […] Some things are clearer with hindsight of several years. It is necessary to evolve HTML incrementally. The attempt to get the world to switch to XML, including quotes around attribute values and slashes in empty tags and namespaces all at once didn’t work …

Berners-Lee wrote, plain and simple, that the attempted switch to XML hadn’t worked and that instead a step-by-step further development of HTML was necessary.

2006: Reinventing HTML by Tim Berners-Lee.

Shortly afterward, a new HTML Working Group was founded at the W3C, which used the results the WHATWG had achieved in the meantime as the foundation for its work. In 2009, the XHTML 2.0 Working Group was officially disbanded. HTML5 had won.

Phase 5: The W3C and the WHATWG—Together Apart

Collaboration between the W3C and the WHATWG went more or less well for a few years, but it rarely ran as harmoniously as it perhaps could have. While the W3C prefers a collaborative discussion culture that at times threatens to sprawl endlessly, at the WHATWG it’s the editor, Ian Hickson, who wears the decider hat—and in case of doubt, he puts it on rigorously.

The (renewed) split came in 2011 over the question of which goals each side wanted to achieve:

In 2011, however, the groups came to the conclusion that they had different goals: the W3C wanted to publish a “finished” version of “HTML5,” while the WHATWG wanted to continue working on a Living Standard for HTML …

While the WHATWG strives for a constantly evolving “Living Standard for HTML” without a version number—and, logically, has also dropped the “5” from its name—the W3C still prefers to publish firmly defined snapshots with a version number.

2013: HTML at WHATWG and W3C.

In December 2012, HTML5 received the status of Candidate Recommendation (abbreviated “CR”) at the W3C. In software development, that roughly corresponds to a first release candidate. Just under two years later, on October 28, 2014, HTML5 became a W3C Recommendation and thus an official standard. HTML5 is thus a frozen snapshot that will no longer be changed and that can serve web developers as a guide to what can already be used today.

The W3C, however, is already also working on HTML 5.1, which roughly corresponds to the WHATWG’s Living Standard. Despite the officially separate development, the two standards continue to influence each other.

And if they haven’t died yet, they’re still quarreling to this day…

[The following section was added in 2019:]

Phase 6: There Can Be Only One—the WHATWG

On May 28, 2019, there was a remarkable announcement from the W3C:

What is described there as collaboration ultimately means that from now on, the WHATWG defines the one and only valid HTML standard:

WHATWG maintains the HTML and DOM Living Standards

So the old Highlander was right after all: There can be only one.

The W3C and the WHATWG work together in the WHATWG repositories; the W3C adopts certain Review Drafts from the WHATWG and publishes them as W3C Recommendations, but the WHATWG determines what HTML is.

May 28, 2019, is thus an important day for HTML, because among other things it means the following:

But as mentioned further above, the browser vendors have in truth always been the ones who determine what is possible on the Web—and the W3C has then documented it.

(This post is a machine-made, human-reviewed, and authorized translation of pmueller.de/­eine-kurze-geschichte-von-html5/­.)