Skip to content
regensbot
DEV-HTM-05Should5 of 7 in HTM

Write valid HTML and close every element

Level
Should

Recommended: skip it only for a reason you can name.

Documentation

Documented

At least one cited Google document states or supports it.

Covered

Automatic

Decided from one URL.

Why it matters

Valid HTML is technically not a ranking factor, but it matters for controls such as data-nosnippet, where an unclosed element can extend the rule to the rest of the page. Parsing turns the HTML into a DOM tree, and broken markup changes what ends up where.

How to meet it

Lint templates in CI with html-validate or the W3C Nu checker, and fix unclosed elements, invalid nesting and stray elements in the head: a parser ends the head at the first element that does not belong there, which pushes later meta tags into the body, and Google stops reading head elements after the first invalid one.

How to test it

The validator reports no errors on key templates, and the robots meta tag, canonical and hreflang appear inside head in the parsed DOM.

How Regensbot covers it

AutomaticNeedsOne URL

Decided from one URL.

An audit reads the response, the headers, the HTML, robots.txt, the sitemaps and the structured data, and the finding shows the evidence it saw.

How verdicts workWhat you connect

Sources

Google documents03

  1. 01Robots meta tag, data-nosnippet, and X-Robots-Tag specificationsGoogle Search Central (opens in a new tab)
  2. 02Search Engine Optimization (SEO) Starter GuideGoogle Search Central (opens in a new tab)
  3. 03Use valid HTML to specify page metadataGoogle Search Central (opens in a new tab)

Claims in the knowledge base04

  1. D2-C080ConsistentControlling indexingSaid on stage
  2. D2-C078ConfirmedControlling indexingSaid on stage
  3. D2-C027UndocumentedHow is HTML interpretedShown on screen
  4. D2-C831SourceHow is HTML interpretedGoogle's documentation

Claim IDs refer to the Search Central Live 2026 knowledge base. The knowledge base (opens in a new tab)

Confirmed
Google's documentation states the same thing.
Consistent
Google's documentation supports it without stating it.
Undocumented
Said or shown at the event, not in the documentation.
Source
The claim is the cited document itself.

Audit

Check it on your site.

One audit checks a URL against all 138 requirements and returns one finding for each, with its source. One URL decides 66; for each of the others, the finding says which source to connect.