html or xhtml

html is the foundation of my work, so it was only natural to start off my first article there. My intentions were good, but I never got beyond writing down XHTML. I looked at it ... then after a while I looked closer. I deleted the "X" and gave it another try. Changed it to lowercase and tried one more time. I put the "x" back. Got frustrated and stopped even before I got one sentence on paper. I was off to a very good start.

Not that it's a very serious issue, but I'd prefer to use the term consistently across my blog. And so I wondered what would be the best name to use.

trying to tip the balance

The technical side of things

The biggest difference between html and xhtml is obviously the way it is treated. xhtml is parsed as xml, which is a very formal and machine-sensitive language, while html is parsed as sgml, a mess of interpretations and lack of straight-forward rules. Something machines do not like at all. This makes xhtml the favorable option, but there is more to it. I won't go into full detail here, but the Safari people have written a nice in-depth article about all the nuances.

Bottom line is simple. From a rendering point of view, it's probably better to write html.

Differences in grammar and spelling

As someone who builds web pages, the technical differences aren't all that important. I have to worry about the practical differences. Looking at both languages, the grammar and spelling differences are really slim. A nice and comprehensive list (with examples) can be found on the w3schools explanation page.

Again, the bottom line is simple. Switching from html to xhtml takes about 5 minutes to learn. The differences really are that minimal.

Making a 360°

All this left me with very little argumentation to choose either one. So I looked at the problem again and tried some different approaches.

Simply looking at the names of both, you see that xhtml (where the "x" stands for extensible) is simply a specification of html. xhtml is html, but extensible. This makes html a more global term, something that obviously takes preference when I'm talking about structuring pages for the web.

Another consideration was the reemergence of html in the form of html5. If I choose xhtml now, I don't want to switch back to writing html when html5 becomes the next best thing.

Taking a stance

So considering all arguments, I decided on html. The code examples I'll give here will be written in xhtml (for the time being), but when talking about the language(s) to structure web content, I think the term html is the safest and most flexible solution.

going through the final details

With that out of the way, the only thing left to decide was whether to use capitalization or not. I know the official way to write html is by using capitals, but since this blog has a strong focus on html and css, I believe that capitalizing these words every time will become a nuisance (it's personal preference, but this sometimes bothers me on other blogs). It draws too much attention, so I'll simply write abbreviations like html and css in lowercase. As a little extra, I provided a small test page where you can see the effect of the capitalization yourself (options to the right of the article).

So that's it really. If I write about html, know that I'm talking about structuring your data for the web, and I'm not specifically targeting xhtml, html4 or some of the future variations. I know it turned out to be a long article for a simple problem, but I really needed to get it out of my system, and this post will hopefully serve as a nice source to point to, should future questions about this subject emerge.