Why isn’t my blog XHTML compliant anymore
Sun 13, November 2005 23:33:20This 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…
<rant>
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.
</rant>
(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…)
Tags: Way of the web
5 Responses to “Why isn’t my blog XHTML compliant anymore”
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!
I love your theme, I love it so much that I can live from now on without my stylish “XHTML valid!” Button
Thanks, and welcome to the club
Jeg hilser til klovnen. Jeg liker klovner veldig godt! Jeg har v
Now, I know why your vSlider theme is not XHTML valid and I can live with that eather
Care to comment?