Why you should validate your Cascading Style Sheets
Validating CSS files ensures conformance to W3C recommendations.
So what?
Heres the deal with code even simple CSS code: cleaner means leaner and more efficient. Validation ensures the css file can be understood by the modern browsers. Being understood by the modern browser means the presentation of your website can be effectively communicated to you audience.
Validation does not mean you’ve chosen the best presentation or the coolest presentation. It doesn’t even mean that your code will present the presentation you intended! It simply means there are no obvious SYNTAX errors in your code. Validation is about the syntax. Nothing else.
However, simple syntax errors can have a serious effect on your website.
The CSS Validator checks for things like:
- Every selector bracket that is opened is subsequently closed
- Every property has a colon
- Every property ends in a semi-colon
- Spell checks standard property names and values
I had a problem once where I couldn’t figure out why a border was missing. It wasn’t until I ran it through the validator that I saw I had misspelled border as bordor. My eyes simply didn’t catch it.
In short, there are four main reasons to validate your CSS file.
- Good practice
- Heck, it is BEST practice
- Catch Errors
- Professional
[tags]css, w3c, validation, validator, webdesign, [/tags]
About the Author
Paul Flyer loves to research the web and find resources and tools for building, maintaining and promoting websites. Based in Saint Louis, MO, he works in management and spends his free time sharpening his web development and copy writing skills. Feel free to contact Paul with any questions, comments or ideas. He is also available to help you with your own website.
Popular Articles
- Removing Line Breaks/Space Before/After H1 tags
- Free Download Manager for Firefox
- Web Development and Design Tool Recommendations
- .htaccess and WordPress
- Removing Image Borders with CSS
- What does it mean to be pinged
- Graphic Design Tool Resources
- Free Blog Software Recommendation
- How to use cPanel to backup your website










