Skip to content

Metadata

How to set the html lang attribute

Search engines use it to decide which language market to show you in, and screen readers use it to pick a pronunciation voice. A wrong or missing value puts you in the wrong results and makes the page unlistenable. It is also a documented WCAG failure.

What 13x checks

This is rule metadata.lang in the public registry: html lang attribute is set and plausible. It runs on every audit, against the pages we actually fetched, and its result is derived from the response rather than estimated.

Surface
Metadata
Score weight
5 of the readiness score
Scope
Runs on every audited page
Applies
To every site

Registry version 2026-07-30. Every rule is published, and the audit is deterministic — the same page produces the same finding every time.

The fix

The same text the audit hands you when this check fails on your own site.

Set the language on the <html> element:

html code
<html lang="en">

Use the tag that matches the content: de for German, de-AT for Austrian German, en-US for US English. If parts of the page are in another language, mark those elements individually with their own lang.

Framework-specific versions

Where the change differs enough to be worth writing out separately.

Does your site have this problem?

13x checks this and 112 others against your live URL in about 30 seconds. No account, and every finding comes with the fix for your framework.

No signup. Results in 30 seconds.

More metadata checks