HTML Validator

Validate HTML markup and structure.

Check HTML for the mistakes that break pages: unclosed and mismatched tags, stray closing tags, duplicate ids and attributes, images without alt text, obsolete elements such as <center> and <font>, and missing essentials like the doctype, the <title>, the charset and the viewport tag for phones. Each problem is listed with its line number and marked as an error or a warning. The checker knows HTML5's rules, so valid shortcuts such as <li> without </li> or <br> without a slash aren't flagged. Your code is checked in your browser.

Common use cases

  • Find the unclosed tag that's breaking a layout
  • Check an email template or landing page before sending it
  • Catch missing alt text for accessibility
  • Review HTML written by hand or generated by a tool

How to use

  1. Paste your HTML, or press Try an example to see typical problems.
  2. Read the list of errors and warnings with line numbers.
  3. Fix them and check again.

FAQ

Is this the same as the W3C validator?

It checks the structural problems that cause most real bugs, quickly and privately. The W3C Nu validator checks the full specification, including which attributes each element allows.

Why is a missing alt attribute a problem?

Screen readers read alt text aloud, and it shows when an image fails to load. Decorative images should have an empty alt="".

Does it check CSS and JavaScript?

No, only the HTML markup.