A worked example, rendered from real sample data. Sign in to run the tool on your own input.
<!DOCTYPE html>
<html>
<head><title>Test</title></head>
<body>
<div class="card">
<p>Mis-nested <strong>bold <em>text</strong></em></p>
<img src="photo.jpg">
<p>Unclosed paragraph
<span>Valid span</span>
</div>
</body>
</html>FAIL 2 errors, 3 warnings, 2 notes
warning L2:1 <html> is missing a lang attribute (e.g. lang="en") [html-lang]
info L4:1 No <meta charset> in <head> — add <meta charset="utf-8"> [meta-charset]
info L4:1 No <meta name="viewport"> — the page will not scale on mobile [meta-viewport]
error L6:38 <em> opened on line 6 is still open — expected </em> before </strong> [unclosed-tag]
error L6:47 Stray closing tag </em> — no open <em> [stray-close]
warning L7:3 <img> is missing an alt attribute (use alt="" for decorative images) [img-alt]
warning L8:3 <p> is never closed — </div> on line 10 implies its end tag [implied-end]
summary elements=11 depth=6 doctype=yes lang=- title=yes images=1 alt-missing=1 links=0 scripts=0 forms=0 headings=0 h1=0 document=yes
Validate HTML markup and structure. Part of the DevTools Surf developer suite. Browse more tools in the HTML collection.