Here is the Thing About Validation
I woke up this morning to a rude email from a reader today. “Jeff,” he said, “I’m sorry, but I have no desire to read your articles when your own site’s CSS doesn’t validate. This only exemplifies the fact that you don’t know the correct way to create a website.”
Mr. Emailer was referring to this:
He probably ran a validation test, saw that it didn’t validate, and then proceeded to slam me without thinking twice. If he had taken a second glance – he would have realized that the only errors come from the fact that I’ve used a few advanced stylings which the validator doesn’t recognize – things like “-moz-border-radius”. For those unaware, this is simply a Firefox-only CSS3 implementation that allows for rounded corners. Even though Internet Explorer will only render it as a square, it’s a sacrifice that I’m happily willing to make.
Other than that, and the use of another advanced pseudo class, there are zero issues with my CSS file.
Here’s the Thing About Validation
My guess is that Mr. Emailer read in a book that he should always ensure that his webpages validate. What he failed to realize was that advanced browser-specific CSS properties won’t pass the test.
The idea of validation has been completely misconstrued by those who don’t understand its purpose. Validation should work for you, not against. In my particular situation, I had two options after validating:
- Remove the advanced properties that only make the experience better for users viewing on modern browsers – all for the sake of receiving that tacky icon.
- Ignore the validator.
Alas, the latter solution is absolutely the correct one.
Having Said That…
Based on the text above, one might assume that validation is a waste of time. On the contrary, this couldn’t be further from the truth. Always, always validate your websites. Many times, you’ll find that a nasty spacing issue is simply the product of a tiny HTML error. In situations like that, the validator can be your best friend. Just make sure, as I said previously, that it works for you, not against.
P.S. Never ever add those cornball HTML/CSS validated icons to your website. Who are they for?