07.06.01
XHTML Thoughts
Got this e-mail today and thought it would make an interesting topic here.
RH wrote: What is your take on XHTML? From the stuff I’ve read, XHTML is a good idea when more browsers support it. Someone today ought to develop to HTML 4.01, especially if you rely on the WYSIWYG tools for HTML authoring. Is this true? I suppose there are tools that would allow you to develop in XHTML and convert it to CSS and HTML 4.01?
The vast majority of XHTML is backwards compatible with HTML4. It simply has some minor tweaks that older browsers won’t really recognize. Webreview has had some great article. Search their site for XHTML, and be sure to read:
http://www.webreview.com/2001/03_02/designers/index01a.shtml
The question isn’t one of “is now the right time to deploy XHTML,” because that question’s basically moot. Nearly all browsers can support XHTML. The real question is what does XHTML provide in terms of value from the development side of things, or the user side of things.
That’s a whole different question.
RH: If I understand what you are saying, about the relationship between browser and specification, then the browser is a better target to “develop to” rather than developing to a particular specification. A question of HTML 4. vs XHTML 1 is more a question of what your application is, your client needs, development environment needs, etc. Is this a true statement in your opinion?
Close, but what I’m really getting at is not a choice between standards and environment, but between two different standards. By all means, code to the standard, whether it’s XHTML 1.0, HTML 4.0 or HTML 3.2 all of which are viable standards at this point. (Hell I’d even go with HTML2.0 if I thought the need was there.)
I wouldn’t try to code to the browsers. Browsers are a moving target. Unless you like redeveloping your site (or at least your JavaScript and CSS) every 6 to 12 months, stick with the standards, because that’s what the newer browsers will support.
In this way, you’re building for the browsers to support you, rather than the other way around.
Is this choice of coding to a standard, not the environment a hard and fast rule? Of course not. You do have to be cognizant of the the users’ browsers. But don’t let the browser lead you, because you will always be playing catch-up.