The Standard Generalized Markup Language (SGML; ISO 8879:1986) is for defining generalized markup languages for documents. ISO 8879 Annex A.1 defines generalized markup:
HTML was theoretically an example of an SGML-based language until HTML 5, which admits that browsers cannot parse it as SGML (for compatibility reasons) and codifies exactly what they must do instead.
DocBook SGML and LinuxDoc are better examples, as they were used almost exclusively with actual SGML tools.
SGML is an ISO standard: "ISO 8879:1986 Information processing – Text and office systems – Standard Generalized Markup Language (SGML)", of which there are three versions:
A markup language is a system for annotating a document in a way that is syntactically distinguishable from the text. The idea and terminology evolved from the "marking up" of paper manuscripts, i.e., the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts.
In digital media this "blue pencil instruction text" was replaced by tags, that is, instructions are expressed directly by tags or "instruction text encapsulated by tags." Examples include typesetting instructions such as those found in troff, TeX and LaTeX, or structural markers such as XML tags. Markup instructs the software that displays the text to carry out appropriate actions, but is omitted from the version of the text that users see.
Some markup languages, such as the widely used HTML, have pre-defined presentation semantics—meaning that their specification prescribes how to present the structured data. Others, such as XML, do not.
HyperText Markup Language (HTML), one of the document formats of the World Wide Web, is an instance of SGML (though, strictly, it does not comply with all the rules of SGML), and follows many of the markup conventions used in the publishing industry in the communication of printed work between authors, editors, and printers.
Generalized Markup Language (GML) is a set of macros that implement intent-based (procedural) markup tags for the IBM text formatter, SCRIPT. SCRIPT/VS is the main component of IBM's Document Composition Facility (DCF). A starter set of tags in GML is provided with the DCF product.
GML was developed in 1969 and the early 1970s by Charles Goldfarb, Edward Mosher and Raymond Lorie (whose surname initials were used by Goldfarb to make up the term GML).
Using GML, a document is marked up with tags that define what the text is, in terms of paragraphs, headers, lists, tables, and so forth. The document can then be automatically formatted for various devices simply by specifying a profile for the device. For example, it is possible to format a document for a laser printer or a line (dot matrix) printer or for a screen simply by specifying a profile for the device without changing the document itself.
The Standard Generalized Markup Language (SGML), an ISO-standard technology for defining generalized markup languages for documents, is descended from GML. The Extensible Markup Language (XML) was initially a streamlined and simplified development of SGML, but has outgrown its parent in terms of worldwide acceptance and support.