The World Wide Web Consortium (W3C) has a free CSS validation service that checks CSS rules for conformance (use CSS3) and syntax.
Validators are simple to use and not only does it check for conformance but it also provides useful feedback for updating your code.
A web browser is a very forgiving program and it may well display your html document but this is no guarantee that the document is correct or the CSS has been applied at all becuase of errors. This is the so called browser “quirk” mode which ignores erroneous code and trys to insert correct code; something you would want to avoid!
Always validate both the HTML and the CSS code.