To prevent search engine and page rank (PR) penalties, website owners need to regularly validate HTML and CSS. Fortunately, the essential tools for maintaining website code compliance are available for FREE from the w3.org or World Wide Web Consortium. The W3C provides a several browser-based validators to check the code validity of Web documents in HTML, CSS, WAP, XHTML, SMIL, MathML, etc. Visit the validate HTML W3C tool.
To use the W3C tool to validate HTML, simply enter the URI of a web page you would like validated and click [check]. The informative error messages are helpful in finding and fixing any errors. Once your markup is valid, it is time to move on to your CSS. To validate CSS the W3C provides the CSS Validation Service for Check Cascading Style Sheets (CSS) and (X)HTML documents with style sheets. Again, enter the URI and click [check].
A full list of validators is available as well as QA Matrix comparing the capabilities of each. The W3C validators are hosted on server technology donated by HP, and supported by community donations. There is also the W3C mobileOK Checker for those seeking to publish WAP content.
About the W3C Tool to Validate HTML and CSS
Most Web documents are written using markup languages, such as HTML or XHTML. These languages are defined by technical specifications, which usually include a machine-readable formal grammar (and vocabulary). The act of checking a document against these constraints is called validation, and this is what the Markup Validator does.
Validating Web documents is an important step which can dramatically help improving and ensuring their quality, and it can save a lot of time and money (read more on why validating matters). Validation is, however, neither a full quality check, nor is it strictly equivalent to checking for conformance to the specification.