Note that I also left off the period after “This is a sentence” above, which violates the rules of grammar, but likely doesn’t cause any problems in communication.Since validation is comparing your code to W3C standards I think the best way to validate your code is using the W3C validation tools.Outside of strings, you must have matching pairs of parentheses '()' and square brackets '[]'.This error is normally displayed when there is a missing parenthesis or bracket, or an additional one has been entered by mistake, or an extra one has been deliberately added but hasn't been properly escaped using '\'. Validating your code is simply comparing it to W3C standards.Much as different languages have different rules of grammar, the code you use can have different rules depending on the doctype you use.One of the discussions that arises from time to time in web development circles is that of validating your code. It’s no different than comparing a sentence you write to the rules of grammar for the language you wrote it in.
Mark-up validators cannot see the "big picture" on a web page, but they excel at picking up missed closing tags and other technicalities.
Pages may not display as intended in all browsers, even in the absence of validation errors and successful display in other browsers.
If your HTML is not valid, or you use syntax in your CSS which is not correct, then you have a much greater chance that your style sheet based web pages won't work.
A list of valid rules will be displayed for the property using the format used in the chosen standard.
The value used is invalid for this descriptor, because the value does not follow the allowed rules for this descriptor.