Does Code Validation Matter?

by Stephanie Rewis on January 13, 2005

For a long time I've been the kind of web developer that enjoys
writing clean, valid code. I have some web friends that think I'm a
little too hard core, but it makes me happy. When I complete a site (or
when I run into a problem while developing the XHTML/CSS), I
use the Web Developer's Toolbar in Firefox to quickly run the page
through HTML and CSS validation. No, I don't put the little button on
my sites — who really cares? But I do make sure it validates.

week, I had a really odd phenomenon happen. I found myself using
proprietary CSS, causing my page not to validate, and then told
someone, “Who cares if it validates!” Shocking coming from my mouth… or fingers.

That said, what's validation really for? Is it the end, or the means
to an end? Is the goal to create pages that work in the validator? Or
pages that work in all major browsers and sell whatever your client is

I've come to believe that if I have to use proprietary code to force a certain browser which shall remain nameless
to render code the way it would be rendered if that browser were
standards-compliant, and it doesn't harm any other browser's rendering
of the page, then I've done my job. If rest of the CSS validates and is
written correctly, then I've used my tools wisely and created a site my
client can make money from and I can be proud of.

{ 4 comments… read them below or add one }

Zoe January 13, 2005 at 3:30 pm

Bravo. Well said. Validation is just a means of making sure you don’t do something stupid. It’s a tool. If you know why you have those errors in there (IE hack or whatnot) then I agree: who cares? It’s important to make sure your pages validate as an debugging mechanism, but it’s not an end in itself, as you said.

Big John January 13, 2005 at 6:57 pm

I have been informed that it does matter, because such an invalid site can’t proudly display the W3C button without risking people clicking it and receiving an *ERROR!* result for that site. Naturally that would be highly embarrassing, thus the need to hide IE proprietary CSS within conditional comments.

That has the effect of hiding the cruft from the validator and returning a glowing endorsement for the site. (heh heh!)

Mike D. January 14, 2005 at 7:36 pm

It matters only if you want to author your pages in XHTML Strict and serve them as application+xml… which in most cases has the effect of creating an extremely “breakable” site. If you pass the site off to your client and there’s *any* chance it can be broken by them (via sloppy updating, etc), then my position is that that’s an irresponsible way to build a site.

I am used to working in environments where hundreds (if not thousands) of people have access to the updating of sites, so clearly in cases like this error tolerance is necessary.

I always find it funny when people complain about invalid code breaking their Strict/application+xml pages. Just don’t use Strict/application+xml then!!! Is that so hard?

Bill January 14, 2005 at 8:44 pm

Well, it’s about time you came around to my way of thinking…

Leave a Comment