2003-01-15 11:41 UTC And on the Eighth Day, He brought forth Progress. And it was good.
Several people have asked me what I think of XHTML2.
In the words of Jack O'Neill, it seems I am not receiving all my memos. Apparently, the popular position at the moment is to diss XHTML2. I'm not entirely sure when this became popular — I think it was last week sometime.
XHTML2 is a working draft, a work in progress, an incomplete specification with many recorded open issues. The XHTML working group, though, have been kindly keeping us apraised of their status by releasing a draft every 4 months or so. This is commendable, and as a member of the CSS working group, I know how hard that is to do. We (the CSS working group) sometimes let years pass between releasing drafts of our modules!
Personally, I think XHTML2 is shaping up to be a great specification.
Here are some of the highlights:
- Any element can be made into a link, not just the
<a>element, simply by adding an
- Any element can be marked with an
editattribute to indicate that it was inserted, deleted, changed or moved.
- Any element can have a
citeattribute pointing to a URI from which the information contained in the element was obtained.
<h>elements make life a lot easier for those editing large documents or generating content on the fly: you no longer have to remember what nesting depth you're at for your headers.
- The lone
<br/>element is finally upgraded to a fully fledged
<l> ... </l>element, so that instead of marking the line break, you can actually mark the real content: the line itself.
- Paragraphs can now contain lists and tables as well as text, so that if your sentence contains a list, you don't need to lie in your markup and split your paragraph into two bits with a list between them.
<nl>element! At last, pages can have explicit markup for Navigation Lists. Instead of using deeply nested sets of
There are also several more controversial features that I think are great, such as:
- It is an XML language, which means that all documents must be well formed or they simply won't render.
- It uses namespaces, meaning that it can be mixed with content from other W3C specifications such as MathML.
- Backwards compatiblility is explicitly not one of its design goals, so some of the hard changes that HTML has needed for some time are possible.
- Its design, by and large, meshes well with the styling capabilities of CSS and binding technologies like HTCs or XBL. This means it is easy to style, but also easy to implement.
styleattribute is removed, which means that in XHTML2 authors are forced to think about separating style from content once and for all. And for those of you who still say you need the
styleattribute: I've gone over two years now without using it. I know this, because I set about, two years ago, to see if I could find a use case for the
styleattribute, and I never found one. If you disagree, drop me a line with your use case.
There are several commonly repeated myths about XHTML2:
- It was redundant with
<abbr>, which is still present. In practice, there is no clear advantage in distinguishing the two, and not always a clear line dividing the two either.
- It has been replaced by
<quote>, which has slightly different semantics with respect to quotemarks. In HTML4, user agents were technically forced to add quotemarks, regardless of CSS. In xHTML2, you get to add quotemarks either in the document, or in the stylesheet, depending on your personal authoring style and preference.
- This decision has been reversed and it will return in the next draft.
- It was already on its way out in HTML4, and is replaced by
<object>which provided much better capabilities for fallbacks and alternate text.
- It was already deprecated in HTML4, and is similarly replaced by
- It is replaced by the more structurally sound
Do I expect XHTML2 to be used the moment it enters the Candidate Recommendation stage? Of course not! The fact that xHTML2 won't be widely used before the end of the decade is not a problem. For some reason, the Internet populous has this strange idea that if something isn't adopted overnight, it must be a failure. Things take time! You have to get the spec implemented, and you have to get the implementations into the hands of the public at large, before big sites will even consider switching to a new technology.
And for those people who actually want a widely supported layout language, don't care about accessibility, don't understand the difference between semantics and style, and don't want to use PDF, then HTML 3.2 is still a W3C Recommendation, and will remain supported for a long, long time. Nobody will be forcing anyone to use XHTML2 on their sites if they don't want to.
Pingbacks: 1 2 3