Skip to content
  • There are no suggestions because the search field is empty.

HTML element

A missing tag carries Prerender's largest single SEO score penalty — here's what's checked and how to get it right.

TL;DR

Prerender's SEO score checks for the <html> element and a valid lang attribute on every cached page. A missing <html> element deducts 100 points — the largest single deduction in the scoring system. An incorrect or non-standard lang code (such as en_us) deducts 1 point; always use a valid ISO code like en or en-US.


Why the <html> element matters

The <html> tag marks the start of an HTML document and tells AI crawlers and search engines what type of content they're processing. Without it, some crawlers may struggle to interpret the page structure correctly, which can affect how your content is indexed.

Prerender checks for the presence of this element when calculating each page's SEO score. A missing <html> element is the largest single deduction in the scoring system at −100 points.

ℹ️ Some templating systems and JavaScript frameworks may omit the <html> tag from the rendered output even if it appears in your source template. Check the rendered HTML that Prerender actually caches — not just your template file.


Why the lang attribute matters

The lang attribute inside the <html> tag specifies the primary language of the page's content. AI crawlers and search engines use it to understand language context. Screen readers also rely on it to determine correct pronunciation for users who depend on assistive technologies.

Prerender checks whether lang is present and whether it uses a valid ISO language code:

<html lang="en">
...
<p>English content</p>
</html>

Use standard ISO 639-1 codes: en for English, fr for French, de for German, and so on. For regional variants, use a hyphen: en-US, fr-CA. See the MDN documentation for the lang attribute for the full list of valid codes.

ℹ️ Non-standard formats like en_us (underscore instead of hyphen) are flagged as incorrect and deduct 1 point from your score. Use en-US for US English.

ℹ️ Including <html> without a lang attribute neither adds nor deducts a point — but AI crawlers and search engines have to infer your content's language. Always specify it explicitly.


Scoring criteria

Element Condition Score impact
<html> element Present +1
<html> element Missing −100
lang attribute Valid ISO code (e.g., en, fr, en-US) +1
lang attribute Non-standard or incorrect code (e.g., en_us) −1

For context on how individual checks combine to produce your overall page score, see how Prerender's SEO score works.


💬 Still need help?
If you have questions about your HTML element check or SEO score, our support team can help.
→ Contact us at support@prerender.io


Related articles

Was this article helpful?