HTML vs. XHTMLI like to imagine HTML as a laid-back don't-sweat-the-details kind of person. Perhaps not quite as hard-working as XHTML, but much happier and at ease with herself. XHTML, on the other hand is downright uptight. Always vigilant, never taking a rest. Sure, she gets more done, but what a price! Before I go off the deep end with my personification of Web page code types, let me tell you the specifics. For starters, know that HTML 4 and XHTML 1.0 use precisely the same elements, attributes, and values. The difference is in the syntax.
What do you get for your troubles?You might be wondering if it's worth it to worry about every last quotation mark. The answer is, it depends. XHTML's rigidity affords a lot of advantages. Think of a clean workshop, with hammers and screwdrivers hanging in their places on the wall and all the nuts and bolts in labeled containers. It's so easy to find what you need that it makes projects a hundred times easier. Similarly, XHTML helps you keep your code consistent, well structured, and free of nonstandard tags, which in turn makes it easier to update and edit, to format with CSS, to generate from or convert into a database, and to adapt for other systems, like handhelds. In addition, XHTML is a logical step in the transition from HTML to XML, since it uses familiar HTML elements and attributes together with modern XML syntax. And since XHTML is the new standard, you can be sure that it will be used with other new and future technologies. Perhaps one of XHTML's most important gifts is that its insistence on standards makes it more likely to be properly and consistently supported by current browsers, on all platformswhich makes good business sense. And since Web page accessibility is now required by U.S. law, and the laws of many other nations, it is something that should not be ignored. For more information on accessibility laws, visit the W3C Web Accessibility Initiative at http://www.w3.org/WAI/. For more details about why standards matter, I recommend a trip to The Web Standards Project (http://www.webstandards.org), a consortium of designers turned diplomats determined to end the browser wars, and Jeffrey Zeldman's A List Apart, an excellent online magazine for Web designers (http://www.alistapart.com). |