HTML and CSS Reference
In-Depth Information
XHTML 1.0 Strict
Similar to HTML 4.01 Strict, the Strict version of XHTML 1.0 emphasizes structure by remov-
ing all presentational tags and attributes, and being XHTML, it also enforces the strict rules of
XML on your markup, as detailed in the section “HTML vs. XHTML: Why the Decision Does—
and Doesn't—Matter.” Use a Strict DOCTYPE when you intend to write only 100 percent clean
markup, free of presentational clutter. To declare XHTML 1.0 Strict, use the following as the
first line of your document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
XHTML 1.0 Transitional
Similar to HTML 4.01 Transitional, the XHTML 1.0 Transitional specification allows for some
presentational markup, although again, the XML rules are enforced. Use a Transitional
DOCTYPE when dealing with legacy files that may still contain some presentational markup
(you can always change the DOCTYPE to Strict once you completely clean up your legacy code).
To declare XHTML 1.0 Transitional, use the following as the first line of your document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
The Three Layers of a Modern Web Document
Modern, well-constructed web documents have three distinct layers of data (see Figure 1-1).
The first is the structure layer , which is (at least for the purposes of this topic) a text document
marked up in HTML or XHTML. It contains the content of your document, along with the seman-
tic information that indicates what each bit of text is (headers, paragraphs, lists, and so forth).
Figure 1-1. The three-layer model of modern web development
Search WWH ::

Custom Search