HTML Validator
Drop any .html or .htm file to instantly check its structure. Verifies DOCTYPE, required elements, tag nesting, deprecated tags, accessibility hints, missing attributes, and more. Nothing leaves your browser.
HTML File
Drop a .html or .htm file here, or
Supports .html and .htm files up to 50 MB
⛔
Wrong file type — only .html or .htm files are supported. You dropped a file.
Validation Errors
Warnings & Best-Practice Hints
✓ HTML Parsed Successfully
Document Info
Structure Preview (first 3 levels)
How It Works
1
Drop your HTML fileDrag it onto the drop zone or click "browse" to select it from your device. Supports .html and .htm files.
2
Structure analysisThe validator parses your HTML using the browser's native
DOMParser, then runs structural checks: DOCTYPE presence, required elements, deprecated tags, accessibility, missing attributes, and more.3
Review the reportGet a pass/fail status plus full stats: element count, links, images, scripts, headings, and a visual structure preview of the first 3 levels.
What Gets Validated
- DOCTYPE declaration — checks that
<!DOCTYPE html>is present as the very first line. - Required structure — verifies presence of
<html>,<head>, and<body>elements. - Character encoding — checks for a
<meta charset>declaration and warns if missing. - Page title — ensures a non-empty
<title>element is present inside<head>. - Language attribute — flags a missing
langattribute on the<html>element (accessibility). - Deprecated elements — detects obsolete tags like
<font>,<center>,<marquee>,<blink>,<strike>, and others. - Image alt attributes — reports images lacking an
altattribute (accessibility / SEO). - Heading hierarchy — warns if the document skips heading levels or contains multiple
<h1>elements. - Empty links — flags
<a>elements with no href or empty text content. - Inline styles & scripts — notes heavy use of inline styles or
onclickattributes as best-practice warnings. - Document statistics — total elements, links, images, scripts, stylesheets, headings, forms, and file size.
- Structure preview — renders the first 3 levels of the element tree so you can confirm the document hierarchy.
🔒 Privacy & Security
All validation is performed locally using the Web File API, FileReader, and the browser's built-in DOMParser. Your HTML is never sent to a server. Suitable for internal templates, private dashboards, client work, or any sensitive HTML content.
