HTML or XHTML?
One of the obstacles to widespread web standards adoption, as I see it, is the confusion within the development community over some basic tenets. One of the most important I think is the argument over whether or not to use XHTML as the document type. Since the doctype declaration is pretty much the first step when coding a new web page, this is a pretty big deal. A developer who is testing the web standards waters, so to speak, and starts doing his research on which version of HTML or XHTML to embrace will quickly find that the community is pretty rigidly split. That's not much encouragement when considering such a big step as entirely retraining yourself how to think, code, and maintain web pages.
Proponents of XHTML like the standardization that XML brings to HTML. Let's face it, HTML barely qualifies as a languageâit's so lax and lets you get away with almost anything. End a tag or don't, use quotes with an attribute value or not, whatever. The trouble with that lackadaisical attitude is the myriad problems it introduces into the development process. One browser may have an issue with an invalidly nested tag, while another won't. Trying to chase down those bugs can drive a grown man insane. The potential for havoc grows when a page is edited by multiple authors. Without strict guidelines for how tags are used, each author will likely have a different approach. Something simple like trying to find a specific code block can be awfully frustrating when some tags and attributes are typed in lower-case, and some in upper-case. Suddenly you have a maintenance nightmare on your hands, and no easy fix. XHTML has strict rules that may seem limiting at first but help the process immensely once you're familiar with it.
Those in the HTML camp, if I understand the argument correctly, oppose XHTML for one of two reasons. First, XHTML declares itself to be a valid XML document, while technically it is not quite. This doesn't cause any problems in modern browsers, but feasibly it could in the future. The second reason is more of a practical, real-world take on the situation: HTML doctype pages work just fine in all modern browsers, so why switch?
As for me, I throw my hat in with XHTML unequivocally. My frustration with the stupidly overly-flexible nature of HTML, a language which forms the foundation of billions of pages on servers across the world, is more than enough to support my viewpoint. I've become further convinced that there is only one suitable solution from my experience in teaching proper markup to professionals responsible for writing and editing content. Take away solid rules and there is no reason to respect anything about HTMLâclearly it's meant to be manipulated. It's sort of a postmodernistic language, do whatever you like.
Why is that bad, you ask? When this utilitarian approach seeps into information design, we're in trouble. Table-based layouts are a great example of why I can't agree with those who reject XHTML because HTML still works just fine for them. The vast majority of web designers use WYSIWYG programs and table-based layouts to create web sites, for the same reason that it appears to work just fine. The reality is that their sites are instantly outdated and horribly inaccessible for anyone but the sighted traditional-browser visitor. Pages should be marked-up so that the tags define the nature of the content, not as some data table that isn't data at all but a mixture of images, text as images, and object tags.
To the argument that XHTML isn't valid XML, I say so what? Browsers don't reject pages that use the XHTML document type and I strongly doubt they ever will. In fact, if a majority of developers use XHTML it will be all but guaranteed that XHTML will be the primary document type supported by future browsers. Either way, I believe the rewards that XHTML brings outweigh the risk.
I think it's vital that those in the web standards community agree on one document type, and that one being XHTML. More structure, not less, is needed. It's clear that pretty much any design or layout we can imagine can be achieved with it, so there's really little reason not to back it. And the integrity of the web standards movement will be strengthened.
There are too many obstacles keeping designers and developers from understanding and embracing web standards. HTML vs. XHTML shouldn't be one of them.
Recent Posts
-
- Comments and ColdFusion
- 08/29
- 2
Regarding a flaw or two in the comments system (and/or the site's messaging) and the response to my 'ColdFusion is Dead' entry.
-
- The Redesign
- 07/22
- 4
The day I've been working towards for over a year has finally arrived: I have launched a complete redesign of my web site.
-
- ColdFusion is Dead
- 07/02
- 38
Regarding Adobe's announcement that they're adding a fresh layer of paint to their dying language.
-
- Should I Be Worried?
- 05/24
- 0
A disturbing problem with my iMac, and discovering the beauty of a UPS.
-
Overcoming a particularly frustrating problem with TinyMCE and multiple domains/subdomains.
In Between is the blog of Dave Lowe, a web designer and developer in the Orange County (Southern California) area.
ShiftWorship