HTML Checker

Paste your HTML and the checker reads it tag by tag, then lists the mistakes that break pages: tags that are never closed, tags closed in the wrong order, duplicate ids, images without alt text and missing page basics such as the doctype, language, title and viewport. Each row gives the line number and a short fix. It checks only the code you paste and is not the official W3C validator.

What you enter

  • HTML to check
  • Full page (also check doctype, language, title, charset and viewport)

What you get

  • Result
  • Errors
  • Warnings
  • Checks run

How it works

  1. Paste your HTML into the box. For a whole page, keep 'Full page' ticked so the doctype, language, title, charset and viewport are checked too.
  2. For a fragment such as a card or a form, untick 'Full page' so the tool does not complain about a missing head.
  3. Read the verdict and the counts, then work down the table from the top. Errors are real mistakes; warnings are things browsers forgive but you should still fix.
  4. Edit your code, paste it again and repeat until the error count is zero.

How browsers treat broken HTML

Browsers never refuse to show a page because of bad HTML. Instead they follow a repair procedure that is written into the standard: close a paragraph when a block element starts, move stray table content out of the table, and close open tags when their parent ends. The page appears, but the repaired tree can differ from the one you meant.

That is why broken markup produces odd symptoms rather than clear errors: a menu that shifts down a line, a style that applies to the wrong block, a form that submits only half of its fields. Finding the tag that started the problem is faster with a checker than with the browser's inspector, which shows the repaired result and hides the original mistake.

Mistakes worth fixing first

Duplicate ids come first on the list because scripts and labels trust them. A label that points to an id used twice attaches to the first match, and a script that looks up a duplicate returns the wrong element. Unclosed and mis-nested tags come next because they change the page structure.

Missing basics come last but still matter. The doctype keeps browsers out of quirks mode, the charset tag stops accented letters turning into garbage, the viewport tag makes the page fit a phone, and the title is the first thing searchers read. Alt text on images helps search engines and everyone who cannot see the picture.

Tips

  • Fix the first unclosed-tag error before anything else. One missing closing tag can make several later tags look wrong.
  • A closing tag that arrives while another tag is still open usually means the inner tag was never closed. Look at the line number of the tag named in the row, not the line of the closing tag.
  • Tags such as p, li and td may legally leave out their closing tag, so the checker does not flag them. Adding the closing tag anyway keeps your code easier to read.
  • Paste the code you actually serve, not your template with placeholders such as {{title}}. Template markers can hide or create tags the browser will not see.

Frequently asked questions

Is this the official W3C validator?

No. It is a lightweight checker that runs in your browser and looks for the most common mistakes. It does not know every rule in the HTML standard, so for a formal check run the official validator as well. It is faster for day-to-day debugging because there is nothing to upload.

What does an unclosed tag error mean?

It means the tag was opened and never closed before the file or its parent ended. For example, in <div><b>text</div> the b tag is still open when the div closes. Browsers guess how to repair this, and the guess may not be what you intended.

Why are some missing closing tags not reported?

The HTML standard lets a few elements, including p, li, dt, dd, tr, td, th, option, head and body, end without a closing tag. The checker follows those rules, so a list item that is closed by the next list item is fine.

What counts as an obsolete tag?

Tags that older HTML versions used for looks, such as font, center, marquee, big and strike. Browsers still show them, but the standard no longer allows them. Use CSS for colour, size and alignment instead.

Does it send my code anywhere?

No. The check runs entirely in your browser on the text you paste. Nothing is uploaded and no web address is fetched.

Related: HTML accessibility checker, Meta tag generator, Text to HTML converter.

Start a 7-day free trial or see all free tools. On We.Inc you get a 7-day free trial, not a free plan: card needed, $0 today, cancel before it ends and you pay nothing. AI building is on paid plans from $20 a month.

More in Free Tools

Related guides

More on this topic

Product

Who It's For

Features

Resources

Company

View Sitemap