TNL.net is designed for modern browsers but the content is still readable in older ones. If you want to ensure the best experience, please install a browser that was developed after 2009.

tnl.net

Much Ado About XHTML 2

There has recently been much grum­bling about XHTML 2 in gen­eral and its dep­re­ca­tion of the IMG tag in favor of the OBJECT one.

While XHTML 2 is indeed a depar­ture from the exist­ing stan­dards instead of being an evo­lu­tion, it is impor­tant to real­ize that some of the things the work­group is try­ing to do is fix old issues and help improve the over­all devel­op­ment of the web. While I agree with Zeldman’s asser­tion that IMG should be dep­re­cated in this ver­sion instead of being com­pletely tossed out, I believe that the tag should never have been in HTML in the first place. The argu­ment for an OBJECT tag date back to the early days of the web (circa 1993) when things broke down into two camps: one that wanted a quick and dirty way to show images on the web (the IMG crowd) and the other that looked for­ward and wanted any type of media to be embed­ded in a page (the OBJECT crowd). We are now pay­ing for the deci­sions that were made back then and, much like tables are still in use for lay­out on most sites instead of being replaced by CSS, we will con­tinue to see IMG tags in code for a very long time.

The next assump­tion by the anti-XHTML 2 crowd is that XHTML 2 won’t be sup­ported by browsers for a long time to come. How­ever, because browsers have now evolved to the point where prop­erly for­mat­ted text can be pre­sented, most mod­ern browsers can already dis­play XHTML 2 with­out any prob­lems (for an exam­ple, just check Sjo­erd Visscher’s weblog), as long as a proper DTD is pointed to. This means that once XHTML 2 makes it to rec­om­men­da­tion level, then all mod­ern browsers will be able to exploit it. How­ever, I sus­pect there will be a slow uptake (as there has already been a slow one on the exist­ing XHTML imple­men­ta­tion) largely because a lot of devel­op­ers do not want to have to deal with the rig­or­ous­ness of XHTML (mak­ing sure all tags are closed, mak­ing sure not improper char­ac­ters are inputted, etc…)

The first step in mak­ing sure that XHTML 2 will move for­ward is in ensur­ing that the browser ven­dors fix their imple­men­ta­tions to con­form to the stan­dard. Microsoft’s imple­men­ta­tion of the OBJECT is bro­ken and needs to be fixed. It does not meet the stan­dard so it is their respon­si­bil­ity to fix it. The same is true of other browsers that do not ren­der it prop­erly. In the long run, the suc­cess or fail­ure of XHTML 2.0 will be based more on whether those things are fixed than on what peo­ple feel is right and, much like the fights over improper CSS nowa­days, this kind of thing will only hap­pen once the devel­op­ment com­mu­nity pres­sures browser ven­dors into fix­ing their code.

Originally published on April 15, 2003 in Technology . You may find related thoughts pieces under the following terms: , , , , ,