HTML validation is a process of checking HTML documents against a formal specification. W3C services offer a number of validation options, from simple document validation to complex conformance checking.
The W3C Markup Validation Service is a free service that checks documents marked up with standards-based technologies including HTML, XHTML, SMIL, MathML, etc. If you use a W3C technology such as HTML 4.01 or XHTML 1.0, this service can help you check to see if your document meets the W3C Recommendation for that technology.
While the W3C's HTML validation service is a quick and easy way to check the syntax of your HTML code, it is not foolproof. In particular, it does not check for code that is not valid but may still be rendered by some browsers, such as certain types of malformed code. Therefore, it is important to also test your code in a variety of browsers to ensure that it is displayed correctly.