Journal entry

No more XHTML for the time being

Ever since I jumped on the web standards bandwagon about 4 years ago, I have almost exclusively been using strict variants of XHTML when marking up web pages. The reason for this is probably that I never really realized the difference between HTML and XHTML when I started to care about the validity and well-formedness of my websites. After all, the difference between the two is pretty small when just observing the code with a naked eye.

Since then, I’ve seen probably hundreds of discussions about whether XHTML served as text/html is a good idea or not, if using XHTML at all is a good idea, and so on. And I never really cared about those discussions. Probably because the W3C validator never complained, and that it worked fine in all browsers.

But now, I’ve been taking my lessons, so to speak. I’ve been reading a lot about the two markup languages lately, ever since I discovered the WHAT WG and HTML 5, that got me a lot more interested in what the issue really was. And my conclusion is that I will probably use HTML 4.01 Strict from now on, until something happens that will make XHTML, or maybe something else, more interesting and useful.

So, I just though I’d share a couple of links that I learned a lot from when trying to understand this whole issue, and the real differences between HTML and XHTML (other than that XHTML is XML and HTML is not).

What do you people think about the whole HTML vs XHTML debate? And what do you prefer to use, and why?

Comments (7)

RSS feed

1. FlorentG said this on February 22nd, 2007, 4:47 pm

I use xHtml everytime, because of the parsing possibilities. As it must be well-formed and is designed on top of XML, you can use any XML parsers and tools.

You may use XSLT transformations, DOM, xPath, which can be valuable server-side.

2. Olof Lönnroth said this on February 22nd, 2007, 5:48 pm

FlorentG: Exactly, if you need those things, XHTML is the right thing. But since I seldom use XML tools with my websites, or any other tool that would make XHTML more desirable, I go with HTML.

3. Brandon Hopkins said this on March 1st, 2007, 1:26 am

I’ve never really cared much and always use HTML and CSS. Never have cared much about standardization, but I do ask my developers to make sure it is all up to code…So I’m on both sides of the fence.

4. Wolf said this on March 26th, 2007, 4:51 pm

Why not? XHTML is cleaner, leaner, and makes you work more precisely.

5. Olof Lönnroth said this on March 26th, 2007, 5:20 pm

Wolf: Sure, but can’t you be just as clean and precise with HTML if you would like to (as long as you write valid code)?

6. Wolf said this on March 26th, 2007, 9:07 pm

Yes you can, but you have to see the bigger picture. The web is moving to another user experience level. If you write according to standards, you’re helping to create a better web. XHTML is only the first step, but jumping on the train now never hurts. Besides, writing XHTML is really easy; writing meaningful markup however isn’t always that easy.

Personally I can’t stand code like TABLE WIDTH=100 HEIGHT=500 anymore.

On a side note, this live update while writing my comment is really cool :).

7. Olof Lönnroth said this on March 26th, 2007, 9:42 pm

I have no trouble seeing the bigger picture, and I think you’ve missunderstood either me or what XHTML really is. HTML doesn’t mean TABLE WIDTH=100 (I can’t stand that either :) ). Just because you’re using HTML it doesn’t automatically mean non-semantic code and tables everywhere. XHTML (version 1.0) is just an XML conversion of HTML 4, they have all the same elements and semantic possibilities. Valid HTML code is just as standardized and nice as valid XHTML code. Read some of the links in my original post for more useful information.

Yeah, the preview is nice :) It’s a Wordpress plug-in, so if you use wordpress it’s easy to implement.

Respond! Add your comment



More entries

The most recent

Archive

Who's writing?

A picture of Olof

Olof Lönnroth is a music producer and web designer from Gothenburg, Sweden. Besides designing and producing, he is currently studying Information Systems Science at the university. You can read more about him here.