Many web designers know that it is important to keep your code clean and valid, whether it is xHTML, CSS, or even Javascript and PHP. All of these languages are constantly updating, and sometimes it can be hard to keep track of how to validate them. Today I will discuss with you how you can validate for CSS3, what you need to add a link on your website, and a few things you should take note of.
CSS Validation
If any of you have validated before, then you will know to use W3C’s validation Service; the one I have linked to is specifically for CSS, but you can find the xHTML validation service on the same page.
By default, this service will validate for CSS level 2.1. This is fine for the majority of modern websites, but with CSS3 creeping from around the corner, it useful to stay validated. Fortunately, it is very easy to change the validation service to validate for CSS3.
- Step 1: Type the address of your style-sheet into the text input field titled “Address:”.
- Step 2: Click More Options, just below the input field.
- Step 3: Select CSS Level 3 for the “Profile:” attribute.
- Step 4: The other settings are fine, just click the “Check” button to see if your style-sheet is valid!
If your style-sheet validates using this method then you can use the links it gives you to add a valid icon or text to the footer of your website. If not, you can fix the errors it shows and try again!
Things to Remember
A few things that are worth noting:
- CSS3 is not a finished language as of yet, use it at your own risk!
- -moz and -webkit rules are not currently valid CSS3 properties – they are browser specific (Firefox and Safari).
Conclusion
CSS3 is an exciting language and offers many possibilities, so make sure you validate your code and keep up to the standards that are put in place!



Quickly do it by linking your sites with: http://jigsaw.w3.org/css-validator/check/referer?profile=css3
This is all well and good, but doesn’t help with validating code that’s not been taken live yet? Is there any CSS3 validator out there that will allow us to drop our code in before going live?
Dudley: The W3 validator has both direct input and upload options, for code that hasn’t been pushed live yet. But I recommend living on the edge!
Everytime I’m valid. EXCEPT for the important stuff like -moz, -webkit etc. C’mon validator!