Say hello to XHTML 1.1!
On May 31st, the W3C released a new specification for XHTML called "XHTML 1.1 - Module Based XHTML." As the name of this new specification suggests, this new formulation for XHTML is strongly based on the XHTML Modularization finalized in April of this year (https://www.w3.org/TR/2001/REC-xhtml-modularization-20010410).
In simple terms, here's how to understand XHTML 1.1. This new version is nearly exactly equivalent to the version of XHTML 1.0 defined by the so-called Strict DTD. In fact, Appendix A of the XHTML 1.1 Specification (https://www.w3.org/TR/xhtml11/changes.html#a_changes) describes the differences between XHTML 1.1 and XHTML 1.0 Strict as follows (emphasis below is mine):
XHTML 1.1 represents a departure from both HTML 4 and XHTML 1.0. Most significant is the removal of features that were deprecated. In general, the strategy is to define a markup language that is rich in structural functionality, but that relies upon style sheets for presentation.
The differences can be summarized as follows:
On every element, the lang attribute has been removed in favor of the xml:lang attribute (as defined in [XHTMLMOD]).
On the a and map elements, the name attribute has been removed in favor of the id attribute (as defined in [XHTMLMOD]).
The "ruby" collection of elements has been added (as defined in [RUBY]).
For more information about XHTMLMOD, please visit https://www.w3.org/TR/2001/REC-xhtml-modularization-20010410; for more information about Ruby, please visit https://www.w3.org/TR/2001/REC-ruby-20010531/.
OK, now for the fun part. What does this really mean? Here are my interpretations:
- For those unfamiliar with the HTML 4.01 Strict or XHTML 1.0 Strict DTDs, XHTML 1.1 basically does away with a variety of elements found in earlier implementations of HTML often used to control document appearance. These include <basefont> for establishing a base document font, <font> to manage font selections explicitly, <center> for centering text, plus several text appearance and list style elements. Going forward, the W3C is stating that style sheets are the only appropriate way to handle such things from now on.
- Deprecated tags are eliminated from XHTML 1.1 completely, as are deprecated attributes. This means that many existing HTML or XHTML documents will have to be restructured to validate to the XHTML 1.1 DTD. Non-presentation elements that fall into this category--style related ones are mentioned in the previous list element--include the applet element (to be replaced by the object element) and the isindex element. Finn Rasmussen of CAP Gemini has put together a nice list of deprecated (X)HTML elements and attributes available online at http://www.ekspertguide.dk/html/new.shtml#deprecatedElements that you can consult to see how your Web pages may be affected.
- XHTML 1.1 requires use of the XHTML modularization rules and naming conventions.
- Ruby annotations provide a way to include short runs of text alongside the base text, used in many East Asian languages to provide pronunciation or annotation information. This, too, is defined in the form of an XHTML module, for easy inclusion or omission. For those creating documents in English this may not make much difference.
- Use of the xml:lang attribute instead of the lang attribute, and replacing the name attribute with the id attribute for a and map elements, keeps XHTML syntax entirely consistent with XML going forward.
By far, the biggest changes are the elimination of deprecated elements and attributes plus mandatory use of modularization. Accommodating these changes will take effort and initiative to convert XHTML 1.0 or HTML documents to meet these requirements. Dave Raggett's HTML-Tidy will help you get some (and in many cases) most of the way there, but this will make for some interesting efforts for those who wish to keep up with the latest and greatest W3C requirements. But only you and your organization can decide if that effort should be undertaken, postponed, or avoided altogether. In a future tip, I'll explore the pros and cons of these various possible approaches.
Send an e-mail to Ed at email@example.com if you have questions on this or other XML topics.
Ed Tittel is a principal at LANWrights, Inc., a wholly owned subsidiary of LeapIt.com. LANWrights offers training, writing, and consulting services on Internet, networking, and Web topics (including XML and XHTML), plus various IT certifications (Microsoft, Sun/Java, and Prosoft/CIW).
Did you like this tip? Send us an email to let us know. We want to know what you think.
XHTML 1.0 Language and Design Sourcebook: The Next Generation of HTML
Author : Ian S. Graham
Publisher : John Wiley & Sons
Published : Apr 2000
In XHTML 1.0 Language and Design Sourcebook, Ian Graham focuses on the needs of Webmasters and Web designers. Writing from a design-oriented point of view, he uses a wealth of real-life examples to introduce readers to the basics of HTML/XHTML and to acquaint them with XHTML's powerful new array of features. He explores the principles of good document design, shows them how to work effectively with graphics and images, and educates them in the principles of strategic site design.