Using an HTML Validator to Find Errors

HTML validators ensure that your code is error-free


Hamza TArkkol / Getty Images

An HTML validator program or service checks HTML markup for syntax errors such as open tags, missing quotation marks, and extra spaces. These quality assurance programs prevent errors and save developer time, particularly when different sets of validation rules — such as those for CSS and XML — are involved.

of 05

W3C Validation Service

What We Like
  • Free.

  • Highly configurable.

  • Works with URLs, uploaded files, and directly entered HTML.

What We Don't Like
  • Doesn’t check spelling or links.

  • Cluttered, outdated interface.

The W3C Validator checks the markup validity of HTML, XHTML, SMIL, and MathML. Enter a URL for the service to test a published document, or upload a file, or paste sections of HTML at the W3C website. The service doesn't include a lot of extras like spell checkers or link checkers, but it provides links where you can run those tools on your site. The service is free.

of 05

Dr. Watson

What We Like
  • Fast.

  • Produces a screen with the entire source code.

What We Don't Like
  • Doesn’t check large web pages.

  • Checks URLS only.

Dr. Watson accepts only URLs for published websites. It checks your HTML, link validity, download speed, link popularity, and search engine compatibility.

When you enter the URL for your website, you can also request that Dr. Watson verify the image links and regular links, and spell check the non-HTML text.

of 05

WDG HTML Validator

What We Like
  • Extras such as tips, reference material, and tools.

  • Validates entire sites.

What We Don't Like
  • Checks only HTML.

The WDG HTML Validator is an easy-to-use online HTML validator that does nothing but check your HTML. Enter a URL or select batch mode to validate several web pages at once.

of 05

CSE HTML Validator

What We Like
  • Thorough checks include spelling, JavaScript, PHP, and much more.

  • Money-back trial.

What We Don't Like
  • Not free.

  • No MacOS version.

CSE HTML Validator software for Windows comes in three paid versions: Standard, Pro, and Enterprise. An older version is available as a free download, but it cannot be used for commercial work and it isn't the latest version. The company offers a 30-day money-back trial period.

The Standard version validates HTML, XHTML, and CSS. It integrates with other software, checks links and spelling, and checks JavaScript and PHP syntax. The Pro version has these same features plus a batch wizard and customizing capabilities, while Enterprise has all the Pro capabilities and features along with priority support, extra TNPL functionality, and enhancements to the batch wizard.

of 05

FreeFormatter HTML Validator

What We Like
  • Accepts both cut-and-pasted HTML and HTML files.

  • Free.

  • Susses out many types of errors.

What We Don't Like
  • Can’t enter URLs.

The FreeFormatter HTML Validator service checks your files for compliance with the W3C standards and assesses the code for adherence to best practices. It flags missing tags, invalid attributes, and stray characters. Just paste your code into the section of the website for this purpose or upload an HTML file.