Prev | Current Page 80 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

In the initial example, the DOCTYPE declaration is the
first thing in the web page. This is always how it should be??”you should never have any
content or HTML elements prior to the DOCTYPE declaration. (An exception is the XML declaration;
see the section ???What about the XML Declaration???? later in this chapter.)
XHTML Strict
For code purists, this is the DTD that does not allow the use of presentational markup or
deprecated elements:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
THE ESSENTIAL GUIDE TO CSS AND HTML WEB DESIGN
32
It forces a stricter way of working, but tends to ensure greater browser compatibility when
you play by its rules, and so it??™s used throughout this book.
XHTML Transitional
In common usage, this friendly DTD enables you to get away with using deprecated elements,
and is useful for those rare occasions where you??™d otherwise be banging your head
against a brick wall, trying to work out how to get around using one of those few still-useful
old tags:
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Note that even if you end up solely using strict markup, the transitional DTD still ensures
browsers generally render elements correctly.
XHTML Frameset
Frames are a relic, and are rarely used online. However, for backward compatibility and for
those designers who still use them, there is a frameset-specific DTD (individual pages
within a frameset require one of the aforementioned DTDs):


Pages:
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92