HTML Validator Online
Paste HTML or open a file to find unclosed and stray tags, duplicate IDs, images without alt text, labels that point nowhere and missing document basics. Every result shows its line and column, and selecting it highlights the code. The check runs in your browser.
Check your HTML
Paste a complete page or a fragment and select Check HTML. Results are listed in source order; fix the first error first, because one missing tag can cause several later messages.
This checker covers the mistakes that most often break hand-written pages. It is not a full conformance validator: before publishing, also run the page through the W3C Nu Html Checker at validator.w3.org/nu for a complete check against the HTML standard.
What the HTML checker looks for
A rendering check answers whether the page looks right. A markup check asks whether the document says what you meant, before the browser quietly repairs it.
The checker reads your markup the way a browser's parser does, including the end tags HTML lets you leave out, such as those for li, p and td. It reports what a browser would have to repair: elements that are never closed, closing tags with no matching element, tags closed in the wrong order, void elements such as br written with a closing tag, a paragraph that ends early because a block element was placed inside it, and links or buttons nested inside each other.
It also reports problems that leave the page looking normal but break behavior or accessibility: duplicate id values, label and aria-labelledby references to ids that do not exist, form fields with no label, images with no alt attribute, empty links and buttons, and in-page links to missing anchors. For a complete document it checks the doctype, the lang attribute, the character encoding, the title and the viewport meta tag.
Valid syntax is not the whole of quality. A checker cannot tell whether the text is helpful, the color contrast is sufficient, the keyboard order makes sense or an image's alt text is meaningful. It also does not earn a search ranking boost on its own. Use it as one precise part of accessibility and content review, not as an SEO score.
Correct the document tree
Improper nesting makes the parser close or move elements, so the DOM differs from what your indentation suggests.
Keep identifiers unique
Duplicate IDs make fragment links, labels and JavaScript selectors ambiguous. Give each target a distinct value.
Verify relationships
Labels, controls and ARIA references depend on exact values. A label that sits beside a field is not necessarily connected to it.
Errors, warnings and notes
Each result has a severity, a position and a plain-language explanation.
Errors
The browser has to repair the markup, or a feature such as a label, link or image description cannot work. Fix these first, starting from the top.
Warnings
Allowed by the parser but likely to cause trouble: a form field without a label, a missing lang attribute, an obsolete element or a link to an anchor that does not exist.
Notes
Advice that needs judgment, such as a heading level that jumps from h2 to h4 or an iframe without a title. Decide case by case.
Select any result to highlight the exact spot in your code, fix it in place, and run the check again.
A four-pass HTML review
Fix structure first, then relationships, then check the rendered result again.
A label that points to the wrong id still looks fine on screen
<!-- Broken: the label points to an ID that does not exist -->
<label for="email-address">Email</label>
<input id="email" type="email">
<!-- Fixed: the values match -->
<label for="email">Email</label>
<input id="email" type="email">In the broken version the page looks normal. Matching for and id makes clicking the label focus the field and gives assistive technology an explicit association.
A duplicate id can break a label while the page still looks normal
An id must identify one element in the document. Repeating it makes relationships and fragment targets ambiguous.
Consider two fields that both use id="email". A label for="email" is associated with the first matching control, even when it sits directly beside the second. A screenshot will not reveal which field receives focus when the label is selected.
Paste the first block into the checker above: it reports the duplicate id with the line where the value was first used. Give each control a unique id, update every for attribute and fragment link, then click each label and move through the form with the keyboard.
<!-- Ambiguous: two controls share one id -->
<label for="email">Work email</label><input id="email" type="email">
<label for="email">Backup email</label><input id="email" type="email">
<!-- Distinct associations -->
<label for="work-email">Work email</label><input id="work-email" type="email">
<label for="backup-email">Backup email</label><input id="backup-email" type="email">Markup validity, accessibility and SEO are related, not identical
A precise diagnosis prevents overpromising what a checker can do.
HTML conformance
A validator identifies markup that breaks HTML rules or has suspicious structure. It is most useful when browser error recovery hides a nesting problem.
Accessibility
Some issues overlap, such as missing label associations and alt attributes, but focus order, contrast and meaningful alternatives need human and assistive-technology testing.
Search quality
Search engines parse imperfect HTML well. Accurate titles, useful original content and crawlable links matter far more than a clean report.
HTML validation without myths
Fix structure before polishing pixels
Open the editor to work on the full project, then check the corrected result in its live preview.
Instant HTML Runner & Viewer with Live Preview
Need to run a short HTML, CSS and JavaScript snippet? The HTML Runner Online has a focused editing surface with live output.
Open HTML Runner Online