XHTML Recommendation

XHTML has finally made it as a recommendation, paving the way for modular XHTML to build a future for mobile and TV based browsing. For the uninitiated, these are the differences between HTML and XHTML:

Documents must be well-formed
No overlapping tags and all tags must close properly
Element and attribute names must be in lower case
This is because XML is case-sensitive, and someone had to make a decision one way or another
For non-empty elements, end tags are required
No more leaving off </td> or </p>
Attribute values must always be quoted
This was always good practice, I guess only the lazy web designer leaves off the quotes these days (unless you're trying to save 90 bytes per page)
Attribute Minimization
This is quite a big change - it means that things like 'checked' or 'nowrap' are now invalid
Empty Elements
You need to terminate empty elements with a / like this: <br />. This applies to all empty elements such as IMG, META, HR or BR
Whitespace handling in attribute values
All multiple spaces in attributes now reduce to a single space
Script and Style elements
Ugly, ugly , ugly change. Because of the way they've declared <script> and <style> you have to escape your code in <![CDATA[ . . . ]]> constructs.
SGML exclusions
This just means that they can't use a DTD to describe some of the restrictions they are placing on XHTML such as no nesting <a> elements.
The elements with 'id' and 'name' attributes
You can't use a 'name' attribute as an identifier any more, you should be using 'id'. This affects named anchors and Netscape JavaScript that does image rollovers
Of course no current browser actually understands XHTML at the moment, but this is the way things are going so start making some of those changes now to save work in 12 months time. Read the HTML Compatibility Guidelines as well to help keep your changes compatible with existing browsers. Good luck.

Permalink: http://blog.iandavis.com/2000/01/xhtml-recommendation/

Other posts tagged as web-development

Earlier Posts