Semantic HTML is the foundation that accessibility, SEO and maintainability all stand on. When a page is built from anonymous <div> and <span> wrappers, screen readers get no landmarks to navigate, search engines get weak structure, and developers get markup that is hard to reason about. This auditor parses your HTML and flags the four highest-impact structural problems so you can move from div-soup to meaningful markup.
How it works
The tool parses your pasted HTML in the browser and runs four groups of checks:
- Landmarks — it confirms a single
<main>(orrole="main") exists and notes any missing<nav>,<header>or<footer>. A missingmainis an error because it is the primary navigation target for assistive tech. - Div-soup ratio — it counts how many elements are
<div>or<span>. When that exceeds 55% on a non-trivial page, it flags the page and suggests semantic replacements like<section>,<article>,<aside>,<nav>and<ul>/<li>. - Fake interactive elements — it finds
<div>or<span>elements with anonclickhandler or arole="button"/role="link", especially those that are not keyboard-focusable, and recommends a real<button>or<a>. - Heading outline — it checks for exactly one
<h1>and reports the first place a heading level is skipped (for exampleh2straight toh4).
Example
The bundled example wraps a logo, menu and footer in plain <div>s, jumps from <h1> to <h3>, and uses <div class="btn" onclick="go()"> as a button. The auditor flags the missing <main>/<nav>/<footer>, the heading skip, and the clickable div — each with a specific fix.
Tips
- Replace structural wrappers with the element that describes their role: a site menu is
<nav>, a self-contained card is<article>, a list of items is<ul>. - Never reinvent a button.
<button type="button">is keyboard-operable, focusable and announced correctly out of the box. - Keep one
<h1>per page and never skip heading levels — the outline is a navigation aid, not just visual sizing. - This is a static structural check; pair it with a screen-reader pass for full coverage. All parsing is local to your browser.