Zooiblog

Search the Zooiblog

Follow the discussion below and participate.

Support this site.

XHTML vs. HTML

(Consider this post obsoleted by this one)

The other day, I was almost debating with Anne about XHTML vs. HTML. Luckily I shut up quickly enough. But I’ve thought about the issue and it hit me. Why do I prefer XHTML? It’s easy. Anne said it himself. XHTML is not forgiving.

But why do I like that? I mean, why wouldn’t I want ease of coding, nothing to worry about, crap allowed? Simple. That’s not me. I want to conform myself to one thing, code in a manner that makes sense. Anne might be right—it’s not better or something. But it does feel better to me. I see it like this: when I write code, I want it to work. How can I get it to work? Make correct code. Now, writing HTML (old-style, without DOCTYPE declaration) doesn’t feel right (for me, mind you). How can I check if it works? Validate? It doesn’t. No DOCTYPE, no chance of validation. Now, how can I check it then? Trial and error? No way. I want to be secure. XHTML does that for me. I can still use <font> tags in my code, but I’m going for semantics. XHTML may not be the only way to be semantic, but I demand more from myself than just anything else. And XHTML demands from me that my code is correct. It really does. And as a plus, I can write XHTML 1.1 and it’s not hard to degrade to HTML 4.01. The other way around gets a tad harder. (Don’t get me wrong on this — HTML can be as semantic as XHTML.)

I am aware my site is considered dangerous, since I don’t MIME correctly. I’m sorry about that, but I just want to conform, but conforming to MIME is one step too far. I’ll degrade to XHTML 1.0 if that’s preferred (convince me…), but as far as I’m concerned, I’ll keep my text/html declaration. You might say it’s harmful, or not perfect XHTML, but I prefer it. I’m sorry.

I didn’t dare debate with Anne on this, but I’m sure he’ll understand — nobody can resist his MIME-blather ;). My decision is clear: use whatever you want, but use it correctly and at least try to write semantic code.

(Don’t consider this subject done, I’m still brewin’.)

Commenting is not possible, however, feedback is welcome.

Participate, yes!