HTML and CSS Reference
1.3. HTML and XHTML: What They Are
HTML and XHTML define the syntax and placement of special, embedded
directions that aren't displayed by the browser but advise it how to dis-
play the contents of the document, including text, images, and other
support media. The languages also make a document interactive through
special hypertext links, which connect your document with other docu-
mentson either your computer or someone else'sas well as with other In-
You've certainly heard of HTML and, perhaps, XHTML, but did you know
that they are just two of many other markup languages? Indeed, HTML is
the black sheep in the family of document markup languages. HTML was
based on SGML, the Standard Generalized Markup Language. The powers
that be created SGML with the intent that it would be the one and only
markup metalanguage from which all other document markup elements
would be created. Everything from hieroglyphics to HTML can be defined
using SGML, negating any need for any other markup language.
The problem with SGML is that it is so broad and all-encompassing that
mere mortals cannot use it. Using SGML effectively requires very expens-
ive and complex tools that are completely beyond the scope of regular
people who just want to bang out an HTML document in their spare time.
As a result, HTML adheres to some, but not all, SGML standards, [*] elim-
inating many of the more esoteric features so that it is readily useable
[*] The HTML Document Type Definition (DTD) in Appendix D uses a subset of SGML to define the
HTML 4.01 standard.
Besides the fact that SGML is unwieldy and not well suited to describing
the very popular HTML in a useful way, there was also a growing need
to define other HTML-like markup languages to handle different network
documents. Accordingly, the W3C defined XML. Like SGML, XML is a sep-
arate formal markup metalanguage that uses select features of SGML
to define markup languages. It eliminates many features of SGML that
aren't applicable to languages like HTML and simplifies other SGML ele-
ments in order to make them easier to use and understand.