Other meanings of Standard Generalized Markup Language
Markup-language standard
Standard Generalized Markup Language (SGML) is an ISO standard defining generalized markup languages for documents. Rather than prescribing one document vocabulary, it provides rules for declaring elements, attributes, entities, and document structure so that specialized markup languages can be created and validated independently of presentation software.1
SGML separates a document’s logical structure from the way it is displayed. Its central idea is descriptive markup: a tag identifies a structural role such as a chapter, paragraph, citation, or table rather than specifying a particular font or page position.1 A document type definition (DTD) declares which elements and attributes are permitted, how they may be nested, and which entities represent reusable or nonliteral content.
The standard was published as ISO 8879:1986 and is a metalanguage rather than a single markup vocabulary.1 This distinction allowed organizations to design document types suited to publishing, legislation, engineering, and archival work while retaining common parsing and validation principles.
SGML documents are interpreted through declarations, markup, and a document type definition. The DTD describes the document’s element structure, while an SGML declaration sets features such as character sets, delimiter characters, and limits used by a particular SGML application.2
SGML supports tags, attributes, entity references, marked sections, processing instructions, and content models. Some markup may be omitted when the DTD makes the intended structure unambiguous, and short-reference mechanisms can provide compact alternative syntax. These features made SGML expressive and efficient for controlled publishing, but they also increased the complexity of parsers and made interchange more dependent on shared declarations and application conventions.
SGML strongly influenced both HTML and XML, although neither should be treated simply as interchangeable SGML documents. Early HTML was defined as an SGML application, with a DTD specifying elements and their relationships.4 The approach helped establish the Web’s use of structural tags such as headings, lists, links, and forms.
Extensible Markup Language (XML) was designed as a simplified subset of SGML for network interchange and easier implementation.3 XML retained core ideas including nested elements, attributes, entities, and document type declarations, while excluding or simplifying several SGML facilities. HTML5 later moved away from the older SGML-based definition of HTML, even though it preserved much of the vocabulary and historical practice associated with it.5
SGML’s less visible importance lies in its role as an infrastructure for long-lived, heterogeneous document collections. Its design supports independent document types, formal validation, entity management, and separation between intellectual content and output formats—features valuable in technical publishing, government records, and large catalogues.
SGML also shaped standards and projects beyond ordinary web pages. The Text Encoding Initiative used SGML as an early foundation for encoding scholarly and literary texts, while HyTime extended SGML concepts toward hypermedia and time-based relationships. SGML’s flexibility has an edge case: two documents can appear similar to a reader yet require different processing because their DTDs, declarations, or entity sets differ. Consequently, reliable interchange requires more than copying visible tags; it requires preserving the governing declarations and vocabulary.
SGML is discussed here as the ISO document-markup metalanguage, not as a generic reference to markup systems or to any unrelated expansion of the abbreviation.
Help improve the encyclopedia. Reports go straight to the site manager.