The Importance of (X)HTML/CSS Validation
A couple of weeks ago, I've been thinking about the importance of a website having perfectly validated XHTML and CSS. I was creating a website design, and I had noticed that some CSS3 properties caused a few errors in the validation.
There are some benefits of having valid markup, such as some SEO benefits, and the more professional look of a valid website. It's also nice seeing that green bar when you run your site through the validator.
I used to think that the w3c validator was an absolute rule to follow, but it's actually just a guideline to follow to help to improve your code.
To find out what others thought, I started a thread at Talkfreelance.com and got some responses. Here are a few of the replies I got.
Definitly stick to XHTML validation, and I would say do CSS Validation *comment out the cSS3 stuff temporarily* to make sure you didn't make any typographical errors or such. Other then that if you wanna use CSS3 that degrades nicely in older browsers go for it.
its always best to make things comply with standards, that way you look professional and not like a learner!
some browser-specific CSS3 implementations had caused some invalid cod
— FWebDe (me)
Yes, but who cares. There is a difference between someone who can't code valid, and someone who is using a bit of CSS so those who use real browsers can get a slightly better experience.
It is totally different to say valid HTML - that, you have no excuse to get wrong (except when clients edit it haha). If the CSS invalidation is ONLY because of CSS3, or.... hmm, say IEpngfix with behavior, or expressions to fix IE min/max width - then that's fine. Is it perfect? No. But do we live in a perfect world? Not til IE goes die in a hole
Of course, there's a difference between XHTML and CSS validation
I always try to use valid XHTML, but it's okay to have a bit of invalid CSS. This is usually caused by the use of CSS3 properties and selectors. Since HTML is used for presentation of the content, and CSS is just for the design, it's more important for the content markup to be valid to get the SEO benefits.
What do you think? Is validation very important to you?