Wednesday 1 December, 2004 ( 2:07PM GMT)
XHTML Transitional is a form of HTML commonly used by developers. But I'm not quite sure why. As John Oxton recently mentioned, doesn't it kind of miss the point?
XHTML Transitional is just that - a transition. It is designed to help developers make the move from one technical standard - HTML 4 - to another technical standard - XHTML 1 (Strict). This is a great learning step if you're stuck in your HTML 4 ways, but it shouldn't be seen as an ultimate goal. Making the choice to switch to any flavour of XHTML in the first place surely means that the choice has been made to want to do it properly. Starting with Transitional to get to grips with the XHTML syntax is perfectly understandable but it's just a halfway house.
In practical terms, the difference between the Transitional XHTML and Strict XHTML is nothing more than the former allowing more tags and attributes than the latter. This might sound preferable, but it's not, not in the long run. XHTML Strict strips out most of the presentational crap that we're trying to get away from - separating structure and presentation is the key to building better web pages. By applying XHTML Strict we are helping to ensure that as little presentational junk hangs around in the markup as possible.
One increasingly unjustifiable reason why a developer might opt for Transitional XHTML is if they have an unusually perverse need to accommodate older, rarely used browsers. Presentational elements might result in better presentation in browsers such as Netscape 4 but using such elements will be detrimental to the efficiency, and possibly accessibility, of your web pages.
Another reason might be if you are working with other, less knowledgeable people, or even completely handing over your code to someone (such as a client) who wants to add/alter/mangle it as they please. But in these cases, there's not much point in having a doctype at all (because the doctype-less quirks mode is, essentially, for people who don't know what they're doing).
But let's assume that in most cases we're not going to be handing over our da Vinci to a manic toddler with a pack of crayons. And let's assume that the best approach to web design is to separate structure and presentation as much as is possible, because, well, it is. Now, isn't the only sensible conclusion that strict XHTML is the way to go?