| Friday, March 12, 2010, 12:58:54 A.M. | Unix Time Converter | In Dutch @ The Cowboys | In Google Directory |
« Google: verkopen we onze ziel aan digitale duivels? | Main | Wikipedia gaat het anders doen »
It took some extra work over the weekend, but my blog (at least the front page) has passed the W3C markup validation service with flying colours; this page is valid XHTML 1.0 transitional now! Thanks to fellow Dutch Cowboy Bert-Jan who took my blog to the validator, and noticed with a big smirk - to my chagrin - that the front page contained no less than 596 (!) errors.
Ehhhhh?
That was the bad news, but the good news was that it wasn't too big a hassle to iron things out and reach a clean level.
For instance; ID's in the style sheet can only have one instance; if you plan to use an ID more than once, you have to use CLASS instead. Other errors for not passing validation were old <p> tags in the code, <br> instead of <br />.
The <p> was the main reason it looked much worse than it really was, as <p> only occured once in my main-index template. But, as it happened, that tag rested on a position in the template where it got parsed 80 or so time times during the building of the static XHTML, so we got 80 errors validating. Other faults: no </img> tags, no </input> tags (didn't even kow those existed), atrribute "type" not specified when calling java-script, attribute "alt" not specified, things like that.
You should not worry about your code if you use the standard MovableType templates; they pass validation.
My problem was that the code for the main-index was a kind of living organism, growing since 1997. When I started using MovableType two years ago, I mixed the old main index (lots of tables, and then again, lots of tables within tables) with the 2.6 MovableType templates. In the meantime MT has been upgraded a few times, my current version is 3.17 (soon to become 3.2).
Somewhere between 2.6 and 3.17 tables were dropped and divisions arrived; welcome to the wonderful world of XHTML. Only one table remains in the code: the calendar, but that one wil also be replaced by a division based one sooner or later.
When upgrading to 3.17 I decided not to change the old main-index, but I took the new templates, and started mixing elements like the random thumbnail and random cookies into the new template. It looked like everything was neat and well, and as there was no difference between the ways Firefox and Explorer parsed the whole kit and caboodle, I rested my templates.
Until Bert-Jan typed my adress in the W3C validator.
Is everything clean now? No, only the front page. I've got some more work to do before the rest of the site is celan too, and I'm afraid, I've got to rebuild all my ImageFolio templates as well.
In the meantime: check your own blog or website, and see for yourself what you have to do. Good luck :-)
P.s. check out: The Sagacity in Validation:
P.s. It's six months later now and when I run the checker I get bombarded with 300+ errors. I know I can clean them up in half an hour or so, but, as the blog is performing well on MIE and Firefox on my XP and even better of FF and Safari on my Mac, why bother? I've removed the XHTML compliant button, to be honest.
Posted by Leon at August 8, 2005 09:38 AM
I've never pushed really hard to make my sites XHTML compliant. But maybe I should start trying. Or am I kneeling here for a puritanical propaganda message? How important is XHTML 1.0 validation anway? My sites look good in the most used browsers, so what's the point?
Posted by: Dorothy at August 8, 2005 04:03 PM
Wow!! 96 errors on my blog. Got some work to do this week to get the code right.
Posted by: Hans Postelmans ? at August 8, 2005 11:05 AM