Let me begin by saying what SGML is not. It is not a document preparation system or a word processor. SGML is not HTML.
In the early 1980s, ISO began working on a set of standards to facilitate the transfer of documents between diverse computer systems. One of the results of these efforts was the Standard Generalized Markup Language (SGML). SGML was designed to make formal the way that documents are defined. SGML is a language for defining how documents are structured. It also defines how documents may be transferred from computer to computer.
Charles Goldfarb was the editor of the ISO SGML standard (ISO 8879.) In the 1970s, he had been working with what he called Generalized Markup Languages. He believed that
These next two paragraphs are taken from Bryan, SGML.
"It is the structure of a document that controls the roles assigned to the various elements of the text. For example, a simple document may consist of a series of headings, each followed by one or more paragraphs of text, while a more complicated document may have a number of different levels of heading, and contain different types of text, including such elements as indented quotations, lists, figures, notes, and so on.
"Normally the structure of information is indicated by differences in the appearance, or the positioning, of the various elements that make up the document. But it is important to realize that it is not appearance itself that conveys structural information. The role of a heading in a typed report is no different from that in a printed one, though it may be printed in the same typeface as the main text while the printed version may be in a different, possibly larger, typeface. Irrespective of appearance, the role of a heading is the same in any document - to help the user to identify the following text."
SGML is used by the United States Department of Defense. If this alone does not lend enough weight to its significance, it is also used by the Office of Official Publications of the European Community. If this is still not good enough for you, look at the World Wide Web. SGML is a very widely used standard.
These are some common reasons cited in favor of using SGML:
SGML allows one to specify the character set that documents are written in. This provides easy interoperability and transfer of documents. Other systems which supposedly are system and device independent (e.g. TeX) are not as unbiased as their proponents would claim.
SGML allows the writer to focus on logical structure and on content without having to worry about output. This is a common feature of writing structured documents. When writing a document in a WYSIWYG word processor, the immediate focus is on the output form. This distracts from the real purpose of documents: content.
This is probably best demonstrated by example:
Some Web tutorials:
My list of SGML web resources