HyperText Markup Language (HTML) is the primary markup language used for creating pages and applications on the World Wide Web. HTML originated around 1990 as a language intended for the distribution of relatively simple structured documents, suitable for use by authors who were scientists or academics rather than experts in printing or other aspects of document formatting. As the Web became more and more popular, HTML was enhanced to satisfy demand for access to multimedia, greater control of layout and fonts, and support for interactive applications. As of 2018, a trio of widely adopted complementary technologies are used for displaying content and supporting interaction on the Web: HTML for structural markup for underlying content, Cascading Style Sheets (CSS) for applying formatting to that content, and JavaScript for supporting interaction and as the basis for content management frameworks that assemble pages dynamically from chunks of content. This description focuses on characteristics that are common to all versions of HTML with an emphasis on the the file format as used for distributing documents or document-like content. It also covers the overall history of the format's development. Descriptions for a number of subtypes provide more detail for the most widely used versions of HTML.
HTML files are textual files, viewable and editable in plain text editors. Originally, HTML files used 7- or 8-bit character sets (typically US ASCII, ISO/IEC 8859-1, or Windows-1252); now UTF-8 is recommended. Over the years, HTML has been developed and maintained as a freely implementable, openly documented format under the auspices of several different organizations.
The format was first developed by Tim Berners-Lee, while he was working at CERN. The first formal specification was published as RFC 1866: Hypertext Markup Language 2.0 under the auspices of the Internet Engineering Task Force (IETF) in November 1995. The World Wide Web Consortium (W3C), which had been founded in October 1994 with Berners-Lee as Director, took over development responsibility for HTML and published the HTML 3.2 Reference Specification as a W3C Recommendation in January 1997. W3C published HTML 4.0 (December 1997) and HTML 4.01 (December 1999) as W3C Recommendations and then turned its focus to XHTML (Extensible Hypertext Markup Language). The W3C Recommendation XHTML 1.0, published in January 2000, was a reformulation of HTML 4.01 in a form that would be valid XML; an important objective was to facilitate the use of widely available XML tools for parsing, editing, and validating source markup for web pages.
In 2004, a group of browser developers (from Apple, the Mozilla Foundation, and Opera Software) felt that the W3C's focus on XHTML was failing to address the needs of real-world website developers, particularly because the Web was now being used for applications, not just distributing document-like content. They formed a new entity, the Web Hypertext Application Technology Working Group WHATWG to continue development of HTML, using HTML 4.01 as a starting point and a 2004 position paper from the Mozilla Foundation and Opera Software as initial guidance. Since then, work on the fifth major generation of HTML specifications has proceeded in both WHATWG and W3C. The relationship has been somewhat complex, as made clear in the History clause of the HTML 5 specification. Nevertheless, in recent years, many important features have been added to the HTML specification. In practice, progress has been incremental, with WHATWG addressing individual problems and needs. Its members, who include the major browser developers, design and test solutions collaboratively, with an emphasis on interoperability and backwards compatibility. W3C has put effort into compiling regular chronological versions that incorporate new features that have interoperable support in two or three browser engines. The first W3C Recommendation for HTML5 (referred to here as HTML 5.0 to distinguish it from later specifications) was published in October 2014 with editors from both WHATWG and W3C named. The document states, "the bulk of the text of this specification is also available in the WHATWG HTML Living standard." Since then, the two inter-related activities have continued, leading to the following situation in early 2018.
- WHATWG continues to maintain a specification for HTML as a "living standard" and does not use the version number 5. To quote from its HTML Standard FAQ 'Going forward, the WHATWG is just working on "HTML", without worrying about version numbers. When people talk about "HTML5" in the context of the WHATWG, they usually mean just "the latest work on HTML", not necessarily a specific version.'
- The W3C has produced further snapshot specifications of the HTML 5 standard: HTML 5.1 (first published in November 2016); HTML 5.2 (first published in December 2017); and HTML 5.3 (in draft as of early 2018).
The original HTML was based on SGML (Standard Generalized Mark-up Language), an international standard [ISO 8879:1986 (SGML)] for marking up text into structural units such as paragraphs, headings, list items and so on. SGML could be implemented on any machine. The idea was that the language was independent of the formatter (the browser or other viewing software) which actually displayed the text on the screen. The use of pairs of tags such as <TITLE> and </TITLE> is taken directly from SGML. The SGML elements used in the original HTML included P (paragraph); H1 through H6 (heading level 1 through heading level 6); OL (ordered lists); UL (unordered lists); LI (list items). See the 1992 description of HTML tags. HTML 4.01 (published in 1999) was still described as an SGML application. However, by that time, it was clear that SGML, although widely adopted in publishing workflows, was not going to be accepted as a distribution format on the Web. Nor were open source tools being developed for working with SGML as a format. So W3C pursued the idea of basing a future version of HTML on XML, itself a subset of SGML. After W3C had produced two versions of XHTML (XHTML 1.0 and XHTML 1.1) as W3C Recommendations, the strategy changed. With HTML5, the approach has been to recognize HTML and XML serializations for the same set of elements and attributes. When the term "XHTML5" is used, it refers to the XML serialization for HTML5. However, the clause on XML syntax from the HTML 5.2 specification states "XML documents may contain a DOCTYPE if desired, but this is not required to conform to this specification. This specification does not define a public or system identifier, nor provide a formal DTD." This is in contrast to XHTML 1.1 which provided both an XML DTD and a schema in the W3C XML Schema language.