HTML Validation Issues — Reference

What each HTML Validator issue means, why it matters for accessibility and SEO, and how to fix it — with links to the WHATWG HTML spec and MDN.

The HTML Validator checks pasted HTML or a live URL against a set of structural, accessibility, and SEO best-practice rules. Each issue it reports links here for a fuller explanation — what triggers it, why it matters, and how to fix it.

Unclosed & mismatched tagsTags without a matching close, or closed out of order Missing doctypeNo <!DOCTYPE html> at the top of the document Missing lang attribute<html> has no lang attribute Charset declarationMissing, or declared too late in <head> Missing <title>No page title Missing meta descriptionNo meta name="description" tag Viewport meta tagMissing, or missing width=device-width Canonical URLRelative, or pointing somewhere unexpected Duplicate id attributeThe same id used more than once Deprecated elements<center>, <font>, <marquee> Image alt textMissing or empty alt attributes Form control labelsInputs without an accessible label Heading structureMissing, duplicate, or skipped heading levels target="_blank" without rel="noopener"New-tab links missing a safe rel value Duplicate attributeSame attribute repeated on one tag Boolean attribute valuedisabled="false" still means disabled Image missing srcAn <img> with no src or srcset Nested interactive contentA link or button containing another link, button, or form field Button missing typeA form button defaulting to type="submit" Invalid ARIA roleA role value assistive tech doesn't recognize Empty link or buttonA link or button with no accessible text Broken label referenceA label's for attribute points to a missing id Positive tabindexA tabindex value that overrides natural tab order Iframe missing titleAn <iframe> with no accessible name Duplicate meta tagMore than one title, description, or canonical tag Multiple structural tagsMore than one html, head, or body tag Duplicate autofocusMore than one element using autofocus Empty hrefA link with href="" that reloads the page Missing faviconNo link rel="icon" in the document Image missing dimensionsNo width/height attribute — a Core Web Vitals (CLS) risk Broken anchor linkhref="#section" with no matching id on the page Inline event handleronclick and similar attributes, blocked by a strict CSP Self-closing non-void tag<div /> doesn't actually close in HTML5 Meta refresh redirectA client-side redirect instead of a real HTTP 3xx Table accessibilityMissing <caption> or th scope attributes srcset missing sizesWidth-descriptor srcset with no sizes attribute Placeholder hrefhref="#" or javascript: on a real link