About this tool
Paste a whole page or just a fragment, and the validator lists every problem with its line and column. Click a problem to jump to it in the editor. It checks the rules of the HTML Living Standard that matter in practice, plus common accessibility mistakes, and it runs entirely in your browser.
What it checks
- Structure: unclosed elements, stray and misnested end tags, and tags that are never closed (missing
>or quote). It knows which end tags HTML lets you leave out (</li>,</p>,</td>and others), so valid shorthand isn’t flagged. - Nesting: blocks such as
<div>inside a<p>or<span>, links inside links, buttons inside links, forms inside forms, table cells outside rows and list items outside lists. - Attributes and IDs: duplicate IDs, IDs with spaces, duplicate attributes, unquoted values that need quotes, and missing required attributes such as
srcandalton images. - Obsolete markup:
<center>,<font>,<marquee>and friends, and attributes likealignandbgcolor, with the modern replacement. - Document: doctype,
<title>,<meta charset>,langand the viewport tag (for full pages). - Accessibility: images without alt text, form fields without labels, empty buttons, links and headings, skipped heading levels, iframes without titles and positive
tabindexvalues.
The <p> trap
The most confusing HTML error is <p><div>…</div></p>. A paragraph can only contain inline content, so the browser closes the <p> automatically when the <div> starts. Your </p> then has nothing to close, and the browser creates an extra empty paragraph. The validator explains this when it happens.
How it compares to the W3C validator
The W3C Nu validator checks every content-model rule in the specification. This tool covers the errors people actually make, gives plain-English explanations, and adds accessibility checks the W3C validator doesn’t do, without uploading your code. For a formal conformance check, use both.
FAQ
How do I check my HTML for errors?
Paste your HTML or drop a file. Problems are listed with line and column numbers; click one to jump to it.
Why does it say “Stray </p>”?
A block element such as <div>, <ul> or <table> inside a <p> closes the paragraph automatically, so your </p> has nothing to close. Use a <div> instead of the <p>, or move the block outside.
Is <br/> an error?
No. The slash on void elements like <br/>, <img/> and <input/> is allowed and ignored. On other elements, such as <div/>, it is an error because the element stays open.
Does it check CSS and JavaScript?
No, it checks the HTML. Use the CSS Validator and JavaScript Validator for inline styles and scripts.
Is my code uploaded?
No. Validation runs in your browser and nothing is sent to a server.