HTML and CSS Reference
In-Depth Information
Introducing XHTML
Thus far, you've worked with documents written to correspond with the specifications
of HTML5. However, other versions of HTML have applications both on the Web and
in the business world. One of these versions is XHTML. Before you can create your first
XHTML document, it's important to understand some of the history of the language.
XHTML has its beginnings in SGML.
SGML
Standard Generalized Markup Language (SGML) is a markup language introduced in
1980 that describes the structure and content of documents or of any type of informa-
tion that is readable by machines. SGML is device-independent and system-independent,
meaning that documents written in SGML can be used, in theory, on almost any type of
device under almost any type of operating system. SGML has been and remains the cho-
sen vehicle for creating structured documents in businesses and government organiza-
tions of all sizes. Think of the daunting task involved in documenting all of the parts used
in a jet airplane while at the same time organizing those documents so that engineers,
mechanics, and developers can use them to quickly retrieve and edit information they
need. SGML provides tools to manage documentation projects of this magnitude.
However, because of its power, scope, and flexibility, SGML is a difficult language
to learn and apply. The official specification for SGML is more than 150 pages long and
covers some scenarios and cases that are rarely encountered by even the most experi-
enced programmer. This means that the use of SGML is limited to organizations that can
afford the cost and overhead of maintaining complex SGML environments. For example,
SGML is not intended for the World Wide Web, where Web page authors need a lan-
guage that is easy to use.
HTML as an SGML Application
SGML is more often used in creating sGML applications , which are markup languages that
are based on the SGML architecture and that can be applied to specific, not general, types
of information. One such SGML application is HTML. Because HTML is an SGML applica-
tion, it shares several properties of SGML, such as device-independence, which is why the
same Web page can be rendered by PCs, cell phones, printers, and screen readers.
One problem that developers confronted early on in the history of HTML was that
Web browsers supported their own unique flavors of HTML to provide customers with
new and useful features not available with other browsers. For example, the iframe
element was originally introduced in the Internet Explorer browser as a way of embed-
ding the contents of one page within another. Although this extension was later adopted
into the official HTML specifications by the World Wide Web Consortium (W3C), many
other extensions were not adopted—such as Internet Explorer's marquee element, which
was used to create blocks of scrolling text. The opposite is also true: Some specifications
proposed by the W3C are adopted by only a few browsers. The result was a confusing
mixture of competing HTML standards—one kind of HTML for each browser and, even
worse, for each browser version. Although browser-specific elements and attributes
increased the scope and power of HTML, they did so at the expense of clarity. Web
designers could no longer create Web sites without taking a lot of time and effort to
ensure their sites worked across various browsers and browser versions.
Another issue that complicated the development of HTML was that browsers allowed
page authors to be lax in their use of syntax. For example, the following code does not
follow HTML specifications because the h1 element has not been closed with an ending
</h1> tag:
<body>
ƒƒƒ<h1>WebƒPageƒTitle
</body>
Search WWH ::




Custom Search