The Markup Validator is a free tool and service that validates markup: in other words, it checks the syntax of Web documents, written in formats such as (X)HTML. It compares your HTML document to the defined syntax of HTML and reports any discrepancies.Learn more about the Markup Validator and the languages it can validate.The process of verifying whether a document actually follows the rules for the language(s) it uses is called .With these concepts in mind, we can define "markup validation" as the process of checking a Web document against the grammar (generally a DTD) it claims to be using.For that reason, the fact that the W3C Markup Validator says that one page passes validation does not mean that W3C assesses that it is a good page.It only means that a tool (not necessarily without flaws) has found the page to comply with a specific set of rules. This is also why the "valid ..." icons should never be considered as a "W3C seal of quality". Markup languages are defined in be equivalent, but in most cases, some conformance requirements cannot be expressed in the grammar, making validity only a part of the conformance.
Check out the list of validators at W3C, including well-known CSS validator, link checker, etc.
The best way to do that is by running your documents through one or more HTML validators.
A lengthier answer to this question is also available on this site if the explanation above did not satisfy you.
Try correcting the first few errors and running your page through The Validator again.
Be patient, with a little time and experience you will learn to use the Markup Validator to clean up your HTML documents in no time. When selected, the "Clean up Markup with HTML-Tidy" option will output a "cleaned" version of the input document in case it was not valid, done with HTML-Tidy, using the Markup Validator's default HTML-Tidy configuration.