Zooiblog

Search the Zooiblog

Support this site.

XHTML vs. HTML Redux

Following up my first post on this subject, I have rethought my statement, and think I’ve come to a solid conclusion.

Writing your sites in HTML is passé, just because XHTML is the future. So are XML and XSL. But choosing XHTML requires some knowledge and a lot of rethinking. You may code a client’s site in XHTML 1.1, everything perfectly valid, except for the MIME-type. So you add a correct MIME-type. Your site may still validate, and may even be correct xhtml+xml protocol. Now, on to the very likely to happen disaster. A client may want to have other content on his page. Hiring you again is something he doesn’t want for such a small thing, so he asks a corporate code monkey. The code monkey starts writing his code, perfectly copied from FrontPage 2003, everything in order, nothing to worry about. Upload. “Yellow Screen of Death”. The client gets angry. It should have worked.

This is what Ben de Groot warned me about (indirectly). A client may love the buzzword XHTML and eXtensibility, but in fact the client can’t even edit his own pages unless he’s crafty with X(HT)ML. No way to satisfy a client.

Using XHTML 1.1 with a text/html MIME-type is considered harmful. Nevertheless I use it on my own blog? Why? Conformation. That’s a closed book.

But what about serving up XHTML 1.0 as text/html? I believe I read something about this, and it suits me. It still isn’t perfect, but if a FrontPage-savvy codemonkey pasts his code into the page, nothing errors. The client is happy. Of course, I don’t recommend using text/html for XHTML at all, but if you like XHTML, please do it so it causes the least of harm.

Now, using HTML like Mozilla.org does is a good way, but it isn’t eXtensible. Faruk has a nice post on this, which saves me from explaining it all again.

I have just one thing in my head, quite annoying. Writing HTML is bad, writing XHTML without the correct MIME-type is bad too. I’ve tried to serve this blog up as application/xhtml+xml, but it didn’t work, which was quite ashaming. Now, what should I do? Switch back to HTML 4.01, XHTML 1.0 Strict, or toss in another MIME-type and risking faulty pages? I know my XHTML knowledge fails on a certain level, so help me out, will you? Please do.

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’.)

Fitts’s Law

When I redesigned the Zooiblog, there was one thing I just had to use. It was Dave Shea’s take on Fitts’s Law.

Continue reading this post.