Special Edition: Using HTML and XHTML
In: Reviews > Book Reviews
Published on October 3, 2002
What? Another HTML book? Why would I want to read another one of those?
That’s a good question, and I have the answer… several answers, in fact.
First off, HTML has changed, is changing, and will continue to change. The very fact that the book’s title includes not just HTML but XHTML indicates that we are in a transitional period. One day, we’ll be authoring Web sites using XML, a markup language that has very strict syntax parameters and structural guidelines. Authoring in XHTML will prepare us for that level of stringency.
Furthermore, this title is authored by Molly Holzschlag. She’s a Web veteran, with more than 20 book titles to her credit. If you look for her books at almost any bookstore with a wide selection of technical titles, you’ll probably find some.
Dustjacket hype notwithstanding, her reputation as a Web expert is entirely earned. She’s an experienced teacher who speaks regularly at Web conferences, and sits on the steering committee of the Web Standards Project.
Web standards and DTD’s
This is the first markup reference I’ve read that puts Web standards up front–literally–in the priorities it addresses. The opening chapters are entitled “Working with Specifications” and “Writing Conforming Documents.” In what she has to say, Molly puts a lot of importance on the value of well-formed and well-structured markup, and she backs up that opinion.
Take a look at Chapter 4, “Choosing the Right DTD”. The book authors who were on the shelves when developers were baselining for first- and second-generation browsers didn’t bother to mention stuff like document type definitions (DTDs). Browsers were so forgiving, it was possible to jump right in and hammer out tags until the document was ready to save. It’s only with the evolution of Web markup toward XML that DTD declarations are becoming necessary.
References in source markup to DTD’s have only become necessary as HTML has grown through several versions into XHTML.
A Document Type Definition is like a big laundry list of tags that are legal for a document’s author to use. By defining at the beginning of your document the DTD you intend to use, you are declaring that your markup will conform to that particular list of tags. A document that fully conforms to the DTD is said to “validate“, and Holzschlag spends some time discussing validation in Chapter 2.
Because browsers are so forgiving in handling documents, one might think that having a document be valid against a DTD is simply optional, but validity is actually required in both HTML and XHTML! Whether or not you’ve worried about writing valid markup in the past, Holzschlag makes it clear that it is better to learn to write markup that validates right from the beginning, instead of needing to learn it later.
The DTD is declared in markup using the
!DOCTYPE declaration. In the past, browsers ignored this declaration, but now Web browser vendors are updating their rendering engines to be more standards-compliant. The newer browsers have two “modes”: a “Strict” mode for pages with proper
!DOCTYPE declarations and a “Quirks” mode for pages which lack one. Holzschlag includes a handy chart which displays how each browser assigns modes to each commonly used
Until very recently, most live Web pages left out the
!DOCTYPE declaration or less often used the /files/includes/default.css value provided by their publishing software. Now is definitely the time to learn what the declaration means, since browsers now pay much more attention to it. Once you’ve seen the differences in how pages are rendered using “Quirks” mode and “Strict” mode, you’ll want to pay attention, too.
Another area covered by Holzschlag that is new to most books on Web markup is XHTML Modularization. Chapter 19 covers this subject in detail, and provides a good introduction for forward-thinking designers.
The XHTML 1.1 Recommendation introduces the concept of modularization, which allows XHTML to accommodate a much larger range of devices than were previously supported. These include digital television, smart phones, handheld devices (PDAs), two-way pagers, car navigation systems, and even /files/includes/print.cssers. Since each of these devices has their own limitations with regard to the display of information, it’s sometimes necessary to customize our markup to make the best use of each device. Modularization allows authors to extend XHTML by writing new “modules” which fit into the two major categories. Abstract modules are collections of similar types of data, and are further subdivided into:
- Core Modules
- The Structure Module
- The Text Module
- The Hypertext Module
- The List Module
- The Applet Module
- Text Extension Modules
- The Presentation Module
- The Edit Module
- The Bi-Directional Text Module
- Forms Modules
- The Basic Forms Module
- The Forms Module
- Tables Modules
- The Basic Tables Module
- The Tables Module
- Additional Modules
DTD Modules are subdivided as follows:
- The XHTML Character Entities Module
- The XHTML Modular Framework Module
- The XHTML Module Implementations Module
- The XHTML DTD Support Modules
Between these two major types of modules, XHTML authors now have a fully extensible set of tools for authoring documents which will be viewable on any technology, present or future.
One area of focus on extensibility which is of particular interest is the ability to customize DTDs, and Holzschlag devotes an entire chapter (Chapter 20) to this exciting development.
It’s become clear that Web page authors must move beyond the current grab bag of hacks and workarounds and learn to write compliant and efficient markup. This book is an extremely useful reference and tool for anyone working toward that goal.
Using HTML and XHTML is more than just a reference, though. The book discusses real world issues ranging from browser quirks to client intransigence.
Perhaps the most useful chapters are the ones I found most difficult. Very few authors of Web markup book titles are delving into the issues surrounding XHTML modularization, DTDs, and XSLT with the same gusto as Molly Holzschlag. For that, I am glad. These are heady days for people like us, some of whom learned HTML as a sort of extension to our word processing software. It’s nice to have such a seasoned professional as our guide as we are forced to become less like “authors” and more like “programmers.”
Special Edition: Using HTML and XHTML
By Molly E. Holzschlag
Que Publishing, 2002, 700pp.