Why isn’t my blog XHTML compliant anymore

Sun 13, November 2005 23:33:20

This post is one big rant about stupid technical programming problems – feel free to ignore it if you really don’t care about this sort of thing…


I care a lot about standards. I really do. Standards are the essence of communication – both for people and machines. If it were up to me, the world would be one big standard (ok, that might be a bit exaggerated, but you get my point). Another concept I’m also particularly keen on is on the separation between content, presentation and behavior when building a web page (i.e. HTML, CSS and JavaScript). I’m on the camp of those who defend that HTML should be just semantics, and therefore putting “font” and “color” attributes, mixed with a couple of “onclick’s” all over the code is really not a good idea – it is only going to make a big mess out of your page, and make it REALLY hard to make large changes to the design (trust me, I’ve been there).

When I first started the design of the theme for this blog, which eventually became the vSlider theme, my intentions were nothing but ambitious. I was going to be relentless, tireless, aiming for web design nirvana – pure XHTML, pure CSS, not one single table for layout purposes, the works. For a moment I even considering using the XHTML Strict Doctype… imagine that!
Then the long hours came, fighting against browser inconsistencies, quirks, different box models, inheritance rules, and so on and so forth. But I wasn’t giving up… no, I would be resilient – no stupid floating div was going to mess up my immaculate CSS layout!
And it was going to be fancy too - sliding boxes, with no JavaScript on the HTML, only using behaviors, handles and all sorts of cool tricks. Oh yes, this was the piece de resistance. I was proud of my work.

But then, to my surprise, the W3C validator said my page is not XHTML compliant anymore! WHAT!? This can’t be… I’ve done everything by the book.
Well, it turns out that the XHTML standard doesn’t allow the usage of custom attributes in the tags. How the hell I’m supposed to keep my code pure, if I can’t define the properties of my object?
I found these excellent articles - JavaScript Triggers & Validating a Custom DTD - that explained exactly what was going on, and, to be honest, I became somewhat disappointed. My belief in the standards was shattered. I mean, honestly, wasn’t the X in XHTML supposed to mean “extensible”? What’s extensible about it? I can’t even “extend” it with my own attributes….
So I stopped caring – vSlider is not pure XHTML anymore, and I’m even proud of it – it’s better than if it was. I’m happy with a “nearly XHTML compliant” status.
Heck, I even turned three nested DIVs that were giving me a hard time in FireFox to a table with three rows – it took me five minutes to accomplish the same result that took almost an hour with those DIVs… there went the “tabless” design out the window :D.


(if you have absolutely no idea of what I’m talking about, just ignore this post entirely – your life is probably way happier than mine anyway. If you DO know – then “cheers, mate!”, misery loves company…)

5 Responses to “Why isn’t my blog XHTML compliant anymore”

Chris Meller wrote a comment on Thu 24, November 2005

Here here! I’ve always felt bad when I wasn’t able to validate a page the way I’d hoped (I included a table to cheat this, or wrapped something in something that it’s not supposed to be wrapped in to cheat that), but you’ve inspired me to stop caring so much.

I thank you and my sanity (what’s left of it after that last CSS encounter) thanks you!

Andreas Rodler wrote a comment on Mon 28, November 2005

I love your theme, I love it so much that I can live from now on without my stylish “XHTML valid!” Button :-)

Rui wrote a comment on Mon 28, November 2005

Thanks, and welcome to the club ;)

shpilman wrote a comment on Tue 4, April 2006

Jeg hilser til klovnen. Jeg liker klovner veldig godt! Jeg har v

Michael wrote a comment on Wed 12, April 2006

Now, I know why your vSlider theme is not XHTML valid and I can live with that eather ;)

Care to comment?