The Relationship Among SGML, HTML, and XML

Programming team at work

Yuri_Arcurs / Getty Images

SGML, HTML, and XML are all markup languages. The term "markup" originated from editors making revisions to writers' manuscripts. An editor "marks up" the manuscript to highlight certain fields. In computer technology, a markup language is a set of words and symbols that highlights text to define it for a web document. For example, to separate paragraphs and put letters in a boldface type, web designers use markup language. Once you understand the roles SGML, HTML, and XML play in web design, you'll see the kinship these distinct languages have with each other. In a nutshell, SGML, HTML, and XML is a family of languages that help make websites functional and web design dynamic.


In this family of markup languages, Standard Generalized Markup Language (SGML) is the parent. SGML provides a way to define markup languages and sets the standard for their form. In other words, SGML states what some languages can or cannot do, what elements must be included, such as tags, and the basic structure of the language. As a parent passes on genetic traits to a child, SGML passes structure and format rules to markup languages.


HyperText Markup Language (HTML) is a child, or application, of SGML. It is HTML that structures the page for a browser. Using HTML, you can embed images, create page sections, establish fonts, and direct the flow of the page. Additionally, using HTML, you can add other functions to a website via scripting languages such as JavaScript. HTML is the predominant language used in website design.


Extensible Markup Language (XML) is a cousin to HTML and a nephew to SGML. Although XML is a markup language and therefore part of the family, it has different functions than HTML. XML is a subset of SGML, which gives it rights that an application, such as HTML, does not have. XML can define applications of its own. Resource Description Format (RDF) is an application of XML. HTML is limited to design and does not have subsets or applications. XML is a pared-down, or light, version of SGML, designed to work with limited bandwidth. XML inherited genetic traits from SGML but is created to make its own family. Subsets of XML include XSL and XSLT.

mla apa chicago
Your Citation
Ferrara, Darla. "The Relationship Among SGML, HTML, and XML." ThoughtCo, Dec. 6, 2021, Ferrara, Darla. (2021, December 6). The Relationship Among SGML, HTML, and XML. Retrieved from Ferrara, Darla. "The Relationship Among SGML, HTML, and XML." ThoughtCo. (accessed June 8, 2023).