Skip to main content

HTML validator

The HTML validator is a program that checks the syntactic conformity of an HTML document. Ideally, an HTML validator will recognize errors in the document and display the source of the error.


An HTML validator is used specifically to verify compliance with the DTD (Document Type Definition), that is, to perform a validation check on a document. Examines a document for missing or incorrect items, attributes, and other errors.

Another example of the general use of a validator is checking the correct spelling of a document.

W3C Validator

A continuation of the HTML validator is the W3C Validator, which at the same time of pure HTML code also checks the following documents:

  • XML
  • CSS
  • RDF
  • OWL
  • Svg
  • WCAG

In particular, it checks whether the conventional syntax has been applied correctly on the corresponding pages. This includes command settings, parentheses, etc., as well as proper nesting. For this, the validator checks the specification used and marks the items as errors that have been formulated or used incorrectly or that are not present in the specification.

Value of an HTML validator

Just because an HTML validator finds syntax errors doesn't automatically mean that you have dirty code. Usually, website owners add commands to their HTML files, which allow older browsers to display the page correctly. A new browser may not be able to do anything with these commands, so the HTML Validator will show them as errors. In fact, they are deliberately integrated to increase web compatibility.

A review of the validator results makes sense in any case. Sites with thousands or even hundreds of code errors often result in a faulty display. This is reason enough for the operator to deal with it in detail.

Relevance for SEO

As a general rule, clean HTML code is also considered a ranking criterion, specifically because Google writes the following in the Google Webmaster Guidelines: "Check your web pages for bad links and make sure you apply the HTML syntax correctly."

In a Google webmaster video, however, Matt Cutts stated that Google does not use valid HTML code as a ranking criterion because there are too many websites with incorrect code. If you had these websites in a lower rank, many sites with valuable content would disappear from the scene. However, Cutts recommends take into account a clean code to ensure the maintainability and the ability to update the site. It also does not rule out that Google's point of view in terms of valid code may change at some time, so it would be better if you were well prepared in terms of SEO.

Web Links