← New search

Other meanings of Standard Generalized Markup Language

Markup-language standard

Standard Generalized Markup Language

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

ISO 8879:1986
Standard designation
1
1986
Original publication
1
XML, HTML
Important descendants or applications
2
1

Definition and purpose

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.

2

Syntax and document model

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.

  • Elements identify structural components.
  • Attributes supply properties or identifiers.
  • Entities stand for reusable text, characters, or external objects.
  • DTDs constrain and validate document structure.
3

Influence on HTML and XML

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

4

Lesser-known aspects

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.

Glossary

Descriptive markup
Markup that identifies a document’s structure or semantic role rather than prescribing its visual appearance.
Document type definition (DTD)
A formal declaration of the elements, attributes, entities, and permitted structural relationships in a document type.
SGML declaration
A declaration that specifies syntax-related features, including character sets, delimiters, and capacity limits for an SGML application.
Entity
A named reference to text, a character, or externally stored content.

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.