HTML and CSS Reference
In-Depth Information
nize. However, this extra processing is not efficient, especially for devices with limited
resources.
Finally, HTML is a structural language—it was originally intended to mark up printed
documents for online viewing. It describes the structure of the document instead of the
contents or information contained in the document. The Web has changed from a
medium used to display electronic versions of paper documents to a medium that pro-
vides diverse information for a variety of devices. HTML does not fit this need. How
will a table 600 pixels wide be displayed on a mobile phone? With the expansion of the
Web to include devices other than personal computers, the need for a descriptive rather
than structural language became evident and XHTML was created.
The purpose of XHTML was to provide a foundation for device-independent Web
access. XHTML was developed by the W3C to be the reformulation of HTML as an
application of XML. Tim Berners-Lee, the W3C director and inventor of the Web,
stated in a press release ( http://www.w3.org/2000/01/xhtml-pressrelease), “XHTML 1.0
connects the present Web to the future Web. It provides the bridge to page and site
authors for entering the structured data, XML world, while still being able to maintain
operability with user agents that support HTML 4.” XHTML combines the formatting
strengths of HTML and the data structure and extensibility strengths of XML. Since
XHTML was designed using XML, let's take a quick look at XML.
XML (eXtensible Markup Language) is the W3C standard method for creating new
markup languages that will support the display of nontraditional content such as math-
ematical notation, as well as support newer display devices such as PDAs and mobile
phones. XML can fulfill these diverse needs because it is an extensible language—it is
designed to allow the definition of new tags or markup. The syntax of XML is very
exacting so that the portable devices will not have to waste processing power guessing
how the document should display, but will be able to display information efficiently.
XHTML, which combines the language of HTML with the syntax of XML, is a
markup language that should adapt to future needs. An XML document must be well
formed. A well-formed document is a document that adheres to the syntax rules of the
language. The XHTML examples in the text will guide you in creating well-formed
Web pages using XHTML.
2.3 Document Type Definition
Because multiple versions and types of HTML and XHTML exist, the W3C recom-
mends identifying the type of markup language used in a Web page document. The
three types of XHTML 1.0, XHTML 1.0 Transitional , XHTML 1.0 Strict , and
XHTML 1.0 Frameset , are defined in Table 2.1.
Table 2.1 XHTML document types
Document Type Definition
Description
The least strict specification for XHTML 1.0; allows the use of Cascading Style
Sheets and traditional formatting instructions such as fonts; used for most of
the coding in this topic
XHTML 1.0 Transitional
XHTML 1.0 Strict
Requires the exclusive use of Cascading Style Sheets; not used in this topic
XHTML 1.0 Frameset
Required for pages using XHTML framesets; not used in this topic
 
Search WWH ::




Custom Search