The History of Markup Languages: From SGML to Markdown

Fractional CTO · Founder of Injuria.ai
The History of Markup Languages: From SGML to Markdown
Markup languages are the invisible architecture of the digital world, a set of annotations that give text structure and meaning. They provide a formal way to distinguish a document's title from its body, a paragraph from a list item, or a data field from its value. The fundamental principle is the separation of content from presentation, an idea that allows a single source document to be rendered consistently across different devices, from printers to web browsers to mobile screens. This separation is the core concept that has driven the evolution of markup for over half a century.
The history of markup is a story of oscillating priorities, a pendulum swinging between expressive power and pragmatic simplicity. Early systems, born from the constraints of mainframe computing and the needs of large-scale publishing, prioritized rigorous, formal structures capable of describing any document imaginable. This led to powerful but complex meta-languages like SGML. The rise of the public internet demanded a simpler approach, giving birth to HTML. As the web matured, the need for structured data returned, leading to XML, a compromise between SGML's power and HTML's accessibility. Most recently, the focus has shifted again, this time toward human-centric simplicity for content creation, championed by lightweight languages like Markdown. Each transition was a direct response to the prevailing technological and economic forces of its era, from the cost of processing cycles to the need for rapid web development and user-generated content.
The Genesis of Generic Coding (1967 to 1978)
The concept of markup predates digital computers, originating in the manuscript preparation process where editors would "mark up" a text with instructions for the typesetter. In the digital realm, early text processing systems like IBM's SCRIPT in the 1960s embedded formatting commands directly within the text. This approach, known as procedural markup, tightly coupled the document's content to a specific formatting program and output device. A document prepared for one printer was unusable on another without significant rework. This limitation was particularly acute for large organizations like IBM, which managed vast libraries of technical manuals that needed to be updated and published across various formats.
The breakthrough came from recognizing the need to separate the logical structure of a document from its presentation. This idea was articulated by William Tunnicliffe at a conference in 1967, where he proposed the concept of "generic coding" to achieve content and format separation. Independently, a team at IBM led by Charles F. Goldfarb, along with Edward Mosher and Raymond Lorie, was developing a solution to IBM's documentation problem. Their work resulted in the Generalized Markup Language (GML), first implemented in 1969. GML was not a set of formatting commands but a way to describe a document's structure. Authors would use descriptive tags, such as :h1 for a top-level heading or :p for a paragraph. A separate program would then process this GML source, interpreting the tags to generate a formatted document for a specific device. This device independence was GML's revolutionary contribution. A single GML source file could be used to produce a printed manual, a digitally browsable file, or any other format for which a processing profile was written.
GML's design was based on two key principles. First, markup should be descriptive, defining the role of a piece of content (e.g., "this is a chapter title") rather than its appearance (e.g., "format this text as 18-point bold"). Second, a document must have a formal structure defined by a document type. This allowed for automated validation, ensuring that, for example, a subheading did not appear before a main heading. These principles, established by GML, would become the foundation for all major markup languages to follow.
The Age of Standardization: SGML (1978 to 1986)
GML was an internal IBM project, but its success highlighted the broader need for a standardized, vendor-neutral way to define and exchange documents. As computer systems proliferated in government, aerospace, and publishing, the problem of incompatible document formats became a significant barrier to information sharing. In 1978, Goldfarb joined an American National Standards Institute (ANSI)[1] committee to develop a formal standard based on the principles of GML.
This multi-year effort, involving experts from industry and academia, culminated in the Standard Generalized Markup Language (SGML)[2]. SGML was formally adopted as an international standard, ISO 8879[3], in 1986. It is a common misconception that SGML is a markup language itself. It is, more accurately, a meta-language: a formal syntax for defining other markup languages. Using SGML, an organization could create a custom markup language tailored to its specific needs by writing a Document Type Definition (DTD). The DTD served as the grammar for a class of documents, specifying which tags were allowed, what attributes they could have, and in what order they could appear.
SGML was designed for immense scale and longevity. Its feature set was vast and its syntax flexible, allowing for shortcuts like optional closing tags to minimize keystrokes, a feature intended to save on expensive storage and data entry time in the 1980s. This power and flexibility, however, came at the cost of significant complexity. An SGML parser was a large and difficult piece of software to write, and understanding SGML required specialized training. Its primary adopters were large institutions with complex, long-term documentation needs, such as the U.S. Department of Defense[4] and the Association of American Publishers[5], who used it to manage technical manuals, legislation, and scholarly journals. For these use cases, SGML's rigor and formality were essential features, not bugs. It guaranteed that documents created in the 1980s would remain usable for decades to come, independent of any single software vendor or hardware platform.
The Web Revolution: HTML (1989 to 1997)
The trajectory of markup languages changed forever with the invention of the World Wide Web. In 1989, Tim Berners-Lee, a British scientist working at CERN[6], the European Organization for Nuclear Research, proposed a system for sharing research papers and data among scientists. His proposal envisioned a network of documents connected by hyperlinks, navigated through a browser. To make this vision a reality, he needed a simple, accessible markup language.
SGML was the obvious technological precedent, but it was far too complex for this purpose. Berners-Lee did not need the infinite flexibility of a meta-language; he needed a single, small, predefined set of tags suitable for academic papers. He created the HyperText Markup Language (HTML)[7] as a simple application of SGML. His initial version, written in 1990, included tags for headings, paragraphs, lists, and, most critically, the anchor tag (<a>) for creating hyperlinks. The goal was not perfect document structure but immediate utility. The language had to be simple enough for a physicist to learn in an afternoon.
As the web grew explosively in the early 1990s, HTML evolved in a chaotic, ad-hoc fashion. Browser developers, principally Marc Andreessen's team at NCSA with the Mosaic browser and later at Netscape[8], began adding their own proprietary tags to gain a competitive edge. The <center> tag and the <img> tag were early examples of such extensions. This "browser war" between Netscape and Microsoft's Internet Explorer threatened to splinter the web into incompatible platforms.
To restore order, the Internet Engineering Task Force (IETF)[9] published RFC 1866[10] in 1995, defining HTML 2.0 as a formal standard to serve as a baseline for all browsers. Responsibility for HTML's evolution was then passed to the newly formed World Wide Web Consortium (W3C)[11], directed by Berners-Lee himself. The W3C released HTML 3.2 in 1997 and the influential HTML 4.01[12] recommendation in 1999. These standards attempted to rein in the proprietary extensions and re-emphasize the separation of structure (HTML) from presentation, which was now to be handled by a new technology called Cascading Style Sheets (CSS). HTML had successfully democratized publishing, but its simplicity had been stretched to its limits. It was a language for displaying documents, but the web was starting to demand a language for structuring data.
The Pendulum Swings Back to Rigor: XML (1996 to 2004)
By the mid-1990s, the limitations of HTML were becoming apparent. It had a fixed, small vocabulary and was designed for human consumption, not machine processing. Developers were using it for tasks it was never intended for, such as exchanging data between servers or defining complex application interfaces. They resorted to hacks, like using HTML tables for page layout, which undermined the principle of semantic structure. There was a clear need for a language with the extensibility of SGML but without its crushing complexity.
A group at the W3C, championed by Jon Bosak of Sun Microsystems and co-edited by Tim Bray, Jean Paoli, and C. M. Sperberg-McQueen, began work in 1996 on a "simplified SGML" for the web. Their project was guided by a set of clear design goals: it must be straightforwardly usable over the Internet, it must support a wide variety of applications, and, crucially, it should be easy to write programs that process its documents. The result was the Extensible Markup Language (XML)[13], which became a W3C Recommendation in February 1998.
XML struck a careful balance. Like SGML, it was a meta-language that let developers define their own tags to structure data, making it ideal for everything from configuration files and vector graphics (SVG[14]) to web services (SOAP[15]). Unlike SGML, it drastically simplified the rules. It eliminated optional tags and other syntactic shortcuts, mandating a strict, consistent structure. Every XML document had to be "well-formed," meaning every tag must have a corresponding closing tag and be properly nested. This strictness, enforced by parsers, was a direct reaction to the "tag soup" chaos of early HTML, where browsers would try their best to render even badly broken markup. XML's rigid structure made it trivial for programs to parse reliably, fueling its rapid adoption for data interchange between applications.
The XHTML Interlude
With the success of XML as a data language, a logical next step seemed to be to reformulate HTML as a proper XML application. This led to the development of XHTML 1.0[16], released by the W3C in 2000. XHTML (Extensible HyperText Markup Language) was essentially HTML 4.01 rewritten to conform to the strict rules of XML. All tag names had to be lowercase, all attributes had to be quoted, and all elements had to be properly closed (e.g., <br> became <br />).
The motivation for XHTML was technical purity and future-proofing. A web built on XHTML would be machine-readable, interoperable with XML-based tools, and displayable on a wider range of devices beyond desktop browsers, such as mobile phones and screen readers. The W3C's vision was a Semantic Web, where data and documents were structured in a way that software agents could intelligently process. However, XHTML's path to adoption was fraught with difficulty. Its primary challenge was its "draconian" error handling model. If an XHTML document was served with the correct application/xhtml+xml MIME type, a single syntax error would cause most browsers to stop parsing and display an error message to the user. This was a stark contrast to traditional HTML's forgiving nature. Most web developers, accustomed to this forgiveness and dealing with a vast amount of legacy content, found the transition too difficult and risky. While many adopted XHTML syntax, they continued to serve it as text/html, defeating the purpose of the switch. The W3C's work on a more ambitious XHTML 2.0, which was not backward-compatible, further alienated the developer community.
The Pragmatic Turn: HTML5 and Lightweight Markup (2004 to Present)
The tension between the W3C's XML-centric roadmap and the practical needs of web developers came to a head in 2004. Frustrated with the slow progress of web standards and the W3C's focus on XHTML 2.0, a group of individuals from Apple, the Mozilla Foundation, and Opera Software formed the Web Hypertext Application Technology Working Group (WHATWG)[17]. Their goal was to evolve HTML, not replace it. They began work on a specification that would become HTML5.
The philosophy of HTML5 was radically different from that of the W3C's XHTML work. It was pragmatic and developer-centric. Its guiding principles were backward compatibility with existing content and a focus on defining new features based on real-world needs. Instead of inventing a new language, HTML5 extended HTML 4, adding features necessary for modern web applications. These included new semantic elements to better describe document structure (<article>, <section>, <nav>, <header>), native support for multimedia (<video> and <audio>), and a <canvas> element for programmable 2D graphics. Perhaps most importantly, the HTML5 specification precisely defined how browsers should handle malformed markup, codifying the error-handling behavior that had previously been inconsistent. This principle, known as "paving the cowpaths," acknowledged how developers actually worked and built a standard based on that reality.
The WHATWG's approach proved so successful and relevant that the W3C eventually had to change course. In 2007, the W3C announced it would work with the WHATWG on the new HTML5 standard, and in 2009 it officially ceased work on XHTML 2.0. The first official W3C Recommendation for HTML5[18] was published in 2014. The WHATWG continues to maintain the HTML Living Standard[19], which is now considered the definitive and continuously updated specification, with the W3C publishing periodic "snapshots" of this work.
The Rise of Simplicity: Markdown and its Kin (2004 to Present)
While HTML5 solved the problem of creating complex web applications, the act of writing simple prose for the web, such as a blog post or documentation, remained cumbersome in raw HTML. Typing <p>Here is some text with an <em>emphasized</em> word.</p> was verbose and distracted from the writing process. This created an opening for a new class of markup languages focused not on machine-processability, but on human readability and ease of writing.
In 2004, the same year the WHATWG was formed, writer and developer John Gruber, with contributions from Aaron Swartz, released Markdown[20]. The language's design goal was explicit: to be as easy to read and write as possible in its plain text form. Its syntax was derived from existing conventions used in plain text emails and Usenet posts for indicating emphasis and structure. For example, asterisks around a word meant emphasis (*emphasis*), and lines starting with a hash symbol meant a heading (# Heading). Gruber also provided a Perl script, Markdown.pl, that converted this plain text syntax into well-formed HTML.
Markdown's success was driven by its simplicity. It hit a perfect balance, providing just enough syntax to structure common text documents without the cognitive overhead of HTML. It was rapidly adopted by blogging platforms, comment systems, and, most significantly, by the software development community. In 2008, the code hosting platform GitHub[21] adopted Markdown for user-generated content, particularly for README files that document software projects. This decision exposed millions of developers to Markdown and cemented its status as the de facto standard for technical documentation.
This widespread adoption, however, revealed ambiguities and omissions in Gruber's original informal specification. As different platforms implemented their own parsers, slight variations and extensions emerged, creating a fragmentation problem. A Markdown document that rendered perfectly on GitHub might look different on another platform. To address this, a community effort led by John MacFarlane, creator of the Pandoc document converter, was launched in 2014 to create a precise, unambiguous specification. This project, now called CommonMark[22], provides a formal spec and a comprehensive test suite to ensure consistent rendering across different implementations. Today, Markdown exists as a family of related syntaxes, including CommonMark and popular extensions like GitHub Flavored Markdown (GFM)[23], which adds features like tables, strikethrough, and task lists.
Conclusion: A Stratified Ecosystem
The history of markup languages reveals a consistent pattern: a search for the right balance between descriptive power and practical usability, driven by the technological constraints of the day. The journey from GML to Markdown is not a linear progression from "bad" to "good," but an evolution into a stratified and specialized ecosystem.
Today, the descendants of these historical efforts coexist, each serving a distinct purpose. SGML's legacy lives on in niche, high-stakes industries that still rely on its rigorous, long-term archival capabilities. XML remains the dominant force for machine-to-machine data interchange, configuration files, and complex document formats like those used in publishing and finance. HTML5 is the undisputed, living language of the World Wide Web, the platform for both simple documents and complex applications. And Markdown, along with other lightweight languages like AsciiDoc and reStructuredText, has become the standard for human-authored content, prioritizing writer convenience and readability above all. The central principle articulated by William Tunnicliffe in 1967, the separation of content from presentation, remains the unifying concept. The modern digital world simply requires different kinds of markup for different kinds of separation.
Sources (23)
- American National Standards Institute (ANSI)
- The Standard Generalized Markup Language (SGML) by Joan M. Smith
- ISO 8879:1986 Standard
- U.S. Department of Defense
- Association of American Publishers
- CERN
- Original HyperText Markup Language (HTML) Documentation
- Netscape (Wikipedia)
- Internet Engineering Task Force (IETF)
- RFC 1866: Hypertext Markup Language - 2.0
- World Wide Web Consortium (W3C)
- W3C Recommendation: HTML 4.01 Specification
- W3C Recommendation: Extensible Markup Language (XML) 1.0
- W3C Graphics: Scalable Vector Graphics (SVG)
- W3C Note: SOAP Version 1.2 Part 0: Primer
- W3C Recommendation: XHTML 1.0 The Extensible HyperText Markup Language
- Web Hypertext Application Technology Working Group (WHATWG)
- W3C Recommendation: HTML5
- HTML Living Standard by WHATWG
- Markdown Project by John Gruber
- GitHub
- CommonMark Specification
- GitHub Flavored Markdown (GFM) Spec