![]() |
|
understanding xhtmlOver the last few years, a massive transition got underway from the old way of designing and building sites to the new. The old way was improvised and based entirely on the site's appearance. (HTML tags were used in ways that were never intended...read understanding tables, p. 160, for a good example). The new way is structured and logical. And while it limits some of your immediate design options, it builds your site to last. XHTML-which will replace its close cousin, HTML-is at the crux of this transition. The purpose of XHTML is to create a web that's more standardized and more compatible with other systems that might want to display the same content, such as screen readers for the blind, older backend database systems, and new upcoming technologies like handheld computers or web-enabled cell phones. To achieve full compatibility with these (and other) systems, the ideal language is XML (extensible markup language), a flexible customizable markup language. But an immediate transition from HTML to XML is impractical, considering the billions of documents written in HTML. This is why the W3C (the industry standards body) introduced XHTML, a transitional language similar to HTML that can pave the way to future. html & xhtml: what's the difference?To the untrained eye, XHTML looks exactly the same as HTML. In fact, XHTML is almost the same as HTML. It was designed to follow the grammar of HTML as closely as possible. The differences, you'll find, are in the details. 5 differences between html and xhtml:
As you can tell, XHTML is more picky and less forgiving than HTML. It introduces some new rules and rigorously enforces the existing ones. Transitioning to XHTML? A List Apart's XHTML tutorials http://www.alistapart.com/stories/indexHTMLXHTML.html New York Public Library's XHTML style guide Buy these books! HTML & XHTML: The Definitive Guide By Chuck Musciano & Bill Kennedy (O'Reilly, $34.95) Designing with Web Standards By Jeffrey Zeldman (New Riders, $34.95) transitioning to xhtmlFor some sites, the transition to XHTML is straightforward. It may be the simple (if time-consuming) matter of revising your current HTML to follow the new rules more exactly. But not all sites have it this easy. If your site design depends heavily on tables and font tags, there's no quick fix. You'll need to revamp the structure of the pages and learn how to accomplish visual effects using stylesheets. You may find that your existing design simply doesn't translate. In this case, you may want to make a gradual transition: First converting from HTML to XHTML, but keeping a tables-based layout. Or you may decide to jump in all the way with a complete redesign, as Wired News did in late 2002. So depending on your site, the transition to XHTML may be a bit painful. New shoes always hurt, as they say. But the transition is inevitable. And the benefits of converting far outweigh the inconvenience of change. So if you're experiencing a lull in development or launching a brand new site, take the opportunity to make the transition. Sooner or later, you're going to have learn the new way. For a complete transitional guide: "Better Living through XHTML" by Jeffrey Zeldman: |
![]() |
|