KuraFire Network


Latest addition: Jan 19, 2007: Times are changing

Log

Supporting XHTML

· By Faruk Ateş on Oct 29, 2004 · 0 comments ·

Subject level: Advanced

The ongoing debate on XHTML on the web is far from being finished, and while it continues I will add my share to the case. In this rather lengthy Log post I discuss most of the things that others have been discussing of late, and give a very thorough explanation on why I support XHTML and condone the use of HTML, in regards to our fight for Web Standards.

%XHTML% has been under discussion for quite some time already, but shortly after I published my Case for XHTML article the topic completely exploded. Mike Davidson announced the ABC News redesign, Keith discusses the comments that followed and the WaSP takes an official position on the issue. So, Web Standards equal validation. I can live with that, since my site validates (if not, you probably couldn't read this right now). But the WaSP's opinion (yes, it's 'merely' an opinion) doesn't quite resolve the issue of XHTML on the web itself. In fact, it pretty much doesn't do anything at all for the issue.

The WaSP focuses on Web Standards on the web, without paying too much attention to which standards are used and how, exactly. Least of all, they don't put a lot of focus on why a certain standard is used in a certain places; which is their every right, of course, seeing as how they're governing the correct use of Web Standards in general, rather than advocating the use of a certain standard in a certain place. And that leaves the topic wide open for me to discuss, yet again. An article on this is in the works, but I feel that in light of some recent weblog entries I should say a few things already.

Anne van Kesteren, one of the bigger HTML-advocates of late (who ironically uses XHTML for his own site), comments on the XHTML-advocacy and, in part, on my comments at various sites on the subject. Since Anne is a friend of mine, we tend to discuss the issue a lot in heated fights when we chat. He claims that HTML is the preferred language, but preferred is really subjective and depends highly on its context. What makes something preferred? I could dedicate a giant philosophy-post on that simple question, so I'll save that for another time. The point is, HTML is preferred by some, and XHTML is preferred by others, so the claim doesn't hold.

Furthermore, Anne comments on semantics, grammatically:

I also notice that people in the comments mix up terms like 'valid', 'invalid', 'well-formed' and 'ill-formed' and are comparing XML and XHTML in a way that isn't appropriate. (Actually, you can't really compare them.)

He's referring to a comment I made on Keith's site:

Of course, that's only if the document is invalid XML - it may be valid XML and invalid XHTML, but then it'll still display properly.

Okay, so let's rephrase it so that it is completely accurate, grammatically and semantically:

Of course, that's only if the document is not well-formed XML - it may be well-formed XML and invalid XHTML, but even then it'll still display properly.

There, now everyone is happy. *cough*

Continuing with the subject, however, we move on to Rob's weblog, where he continues the discussion and asks us:

Why deprecate HTML when it's still in use on 97% or something on the internet?

I'll tell you why, with a counter-question: why deprecate Internet Explorer when it's still in use by 97% of the Internet population? The answer to both questions: because it is outdated, and because it isn't strict enough to be reliable.

Several people claim that HTML can be just as strict as XHTML. This is utter nonsense: HTML will never give me a warning if I'm not being strict enough, but XHTML (sent as application/xhtml+xml) will give me that warning. HTML will never tell me that my page isn't valid when it isn't, but XHTML will [1]. Any and all who claim that HTML is just as strict as XHTML is missing the point of what it is to be strict. Being truly strict means you don't work if you're not working, simple as that. HTML `works` (read: displays), even if it's not working (read: invalid). This is unreliable and unacceptable behaviour for anyone who wishes to work in a strict (and thereby more efficient) environment.

But let's get on to the whole point of the debate: XHTML versus HTML and their respective uses in the fight for Web Standards.

Why we need XHTML

It's about Web Standards, and to be more accurate, it's about spreading Web Standards. Let's review:

  • Fact: XHTML is a Web Standard (as close as you can get to being a true Standard, anyway. See Molly's post on how the term "Standard" is technically incorrect)
  • Fact: HTML is also a Web Standard
  • Fact: if you wish to follow Web Standards, you may use HTML just as much as you may use XHTML, it's up to you
  • Fact: using HTML will not cause Web Standards to spread widely
  • And the most important fact of all: using XHTML will cause Web Standards to spread widely

If you don't believe the last two facts, here's a clue: when vBulletin 3 was first released, all of the templates had become XHTML Transitional (albeit only valid until users would start posting). The fact that vBulletin 3 was in XHTML as opposed to HTML in vBulletin 2 has caused many thousands of their customers to become aware of the %W3C%, XHTML, %CSS% and Web Standards in general. If they had chosen to go for HTML, like they did with their previous version, then none of those thousands of customers would have been introduced to the world of Web Standards, plenty of which are now reading weblogs about XHTML and CSS and Web Standards. They may not be experts in the field (yet), they may not be sending their XHTML pages with a correct MIME-type, but at least they are now aware of the whole world of Web Standards, of that it exists. If vBulletin 3 had been traditional HTML, that would not have been the case.

Anne complains that people should understand more often that HTML is not a complex language. It is indeed very easy and accessible for people to get into. This is exactly why HTML is a danger to Web Standards: since it is so accessible, it means people who don't really care about doing things properly, can make websites easily. This means there are a million-and-one people making sites that will never validate, simply because it is so easy to make such sites.

Now, on the other hand, nearly all people who create XHTML websites know that there is such a thing as validating your pages. They may not care to make their pages actually validate, but at least they know that there are Web Standards.

XHTML does the job of spreading awareness. The goal of Web Standards isn't one that you achieve in a single step. It's a step-by-step process (I'm repeating myself here, I think) and people will be taking these steps in their own pace. Forcing them to jump from start to finish will be counter-productive. Telling them to use HTML is equally counter-productive, as HTML can not and will not bring awareness to the playing field. We've had HTML for many years, and in all its life it has never caused a lot of people to educate themselves about Web Standards. We've had XHTML for a much shorter time than HTML, but in that time it has been incredibly successful in raising awareness of Web Standards.

Now, all this will raise a few questions with some people. I'll discuss the most important one, which is why I'm an XHTML advocate, and why I'm so specifically bent on XHTML rather than Web Standards in general.

Advocating Web Standards is a good thing; I'll agree with anyone on that. But obviously, following Web Standards is only possible once you're aware of Web Standards in the first place. I look at the big picture, and when I do so I see that by far most of the entire web isn't aware of Web Standards yet. Everyone starts at the bottom, and that includes all of the most prominent advocates. Let's take a good look at how things come to be.

Right now, there are a few hundred, perchance already a few thousand websites that are valid XHTML and use a correct MIME-type. But let's be honest here: how many people started their first-ever XHTML (and validating) website with the right MIME-type? I know of two: Jacques Distler, and myself. I only count because the opening of my first-ever XHTML website was postponed for almost a year, during which I learned about all such details and had the luxury of opening my site with everything done correctly right away. And I'm not even 100% certain that Jacques started his site with the right MIME-type from day one.

So what does that tell you? That even the top bloggers on the field started out at the proverbial bottom. They worked their way up, one step at a time. My question is, why are some people not letting others do the same? What's the point of telling people they should use HTML when the people that make such claims aren't using HTML themselves, and were in fact doing it wrong themselves until a (relatively short) while ago? Come on people! Let's just let everyone get to 'the top' in their own pace. Don't force others to get it right in one try, if you couldn't do that yourself!

Now, if the inaccessibility of XHTML (in terms of being easy to get into) is a concern, then we should work on that rather than tell people they should use HTML. Andrei has already made a very thorough article on the W3C Specifications' shortcomings, and I intend to take his outcry to heart and rework to XHTML Specification so that it's more accessible to people who wish to build websites using XHTML. If you want to support Web Standards, this is a better opportunity; using HTML and/or telling others to use HTML isn't going to make a lot of people become aware of Web Standards, unless you intend to track down every single visitor of all your sites and inform them.

So please, if you want to support Web Standards, start looking at the big picture and raise awareness first. The arguments against invalid XHTML are pretty silly, anyway: unencoded ampersands are a risk, but not a real danger. Yes, if you use them in URL's when the variable name also happens to be an entity name, you'll have problems in your sites. But who on earth would use variable names that are also HTML entity names and not find out real soon? As for benefits of XHTML, I'm going to leave that for my (business-focused) article on XHTML that will follow soon.

Since commenting, trackbacks and pingbacks are not yet implemented in the CMS that I use here, please use the contact form if you have a comment on this entry, or if you're commenting on it in your own weblog. In the case of the latter, I will manually add 'trackbacks' to your entry below, providing I know of it of course.

[1] XHTML will only give a warning when the XML-part is incorrect; this inherently means it won't validate, but the opposite is not true. A well-formed XHTML document may work, but not validate. Even so, this is much more reliable and strict than HTML is.

Bookmark: Newsvine del.icio.us Digg

All times are in CET. It is now 19:46.