Account

What new tool do you want?

Developer Tools

HTML Checker (Tags, Accessibility, SEO Basics)

Check HTML for unclosed or mismatched tags, duplicate IDs, images without alt text, missing lang/title/viewport and other common mistakes.

How to use

  1. 1Paste your HTML (a full page or a fragment).
  2. 2Fix the issues listed — each shows the line number.

How it's calculated

Tags are matched with a stack (void elements like <img> and <br> need no closing tag). Page-level checks run only when the HTML includes <html>.

Frequently asked questions

Is this the same as the W3C validator?

No — it catches the most common real-world mistakes quickly. For full spec conformance, also run validator.w3.org.

Why does alt text matter?

Screen readers read it aloud and search engines use it. Decorative images should have an empty alt="".

Are self-closing tags like <br/> OK?

Yes — HTML allows the trailing slash on void elements; it's simply ignored.

Worked example: HTML Checker

Paste <div class="card">\n <img src="a.png">\n <p>Hello <b>world</p>\n</div> and the checker reports exactly 2 issues: line 2's <img> is missing alt text, and line 3's <b> was never closed before the </p> that follows it. That second check relies on a real tag-matching stack — when the parser hits </p>, it looks backward through the open-tag stack, finds <b> sitting unclosed above the matching <p>, and flags it specifically rather than just saying "something is broken" — the exact line of the dangling tag is what you get, not just a count.

Why li, td and a few others don't trigger false positives

HTML actually permits certain tags to be implicitly closed by the next sibling — <li>One<li>Two</ul> is valid HTML, where the first <li> is auto-closed the moment the second one starts, even with no </li> written at all. The checker hardcodes a small OPTIONAL set (li, p, td, th, tr, option, dt, dd) that it never flags as unclosed, specifically because flagging these would mean every single real-world HTML list, table, or paragraph sequence lights up with false warnings — matching how browsers themselves implicitly handle these tags, not an arbitrary leniency.

Why this isn't the W3C validator, and when that distinction matters

This tool runs a handful of fast, targeted regex and stack-based checks for the mistakes that come up constantly in real code — unclosed tags, duplicate IDs, missing alt text, target="_blank" without rel="noopener" (a real security/performance issue, since the opened page can otherwise access window.opener), and page-level checks like a missing viewport meta tag that only run when an <html> tag is present. It does not implement the full HTML5 parsing specification the way validator.w3.org does, so obscure structural rules (invalid nesting combinations the spec forbids, obsolete attributes) won't be caught here. Use this for a fast pass during development, and the W3C validator before something ships to production.

Comments are blanked so they do not look like tags

An empty box shows no statistics and no error. Comments are blanked before the check, but the line breaks inside them are kept, so a problem later in the file still reports the original line. The inside of a script or style block is blanked the same way. li, p, td, th, tr, option, dt, and dd are treated as tags that may omit an end tag, so a missing closer on those does not become a false mismatch. The placeholder is a small card: an image, then a bold tag that is still open when the paragraph ends. That is the kind of overlap the check is meant to catch. Other tags are expected to close in order.

Related tools

More: Developer Tools