SGML stands for Standard Generalized Markup Language. It can be defined as the standard for defining generalized markup language for documents.
It was developed and designed by the International Organisation for Standards i.e ISO.
HTML was theoretically an example of an SGML-based language until HTML 5, which browsers cannot parse as SGML for compatibility reasons. The SGML is the extended from GML and later on it is extended to HTML and XML.
The extension of SGML files is:
<NAME TYPE="user"> Geeks for Geeks </NAME>
SGML code typially looks like:
- The SGML Declarations.
- The Prologue, containing a DOCTYPE declaration with the various markup declarations that together make a DTD i.e Document Type Definition.
- The instance itself, containing one top-most element and its contents
Components of an SGML Document :
There are mainly three components of SGML document. They are –
- SGML Declaration
- Document instance.
- It has the capability to encode the full structure of the document and can support any media type.
- It is of much more use than HTML which provides capabilities to code visual representation and not to structure the real piece of information.
- Separates content from appearance.
- SGML files encoding is allowed for more complex formatting as compared to HTML.
- The Stylesheets present in SGML make the content to use for different purposes.
- Extremely flexible.
- Well supported with many tools available beacuse of ISO standard.
- It may be typical to code software in SGML.
- Tools that are used in SGML are expansive.
- It may not be used widely.
- Special software is required to run or to allow the document to display.
- Creating DTD’s requires exacting software engineering.