The lang attribute: what a page says it is, in its own markup
The lang attribute is where a document states which language it is written in. An alternate declaration points at other addresses; this one describes the page you are already looking at, which makes it useful for checking one page rather than counting a set. As of 2026-09-22.
| Property | The page own-language attribute | An alternate declaration |
|---|---|---|
| What it describes | This document | Other addresses |
| Useful for | Checking one page | Counting a set |
| Read by | Screen readers, spellcheckers, search engines | Search engines |
| Can be wrong | Yes, and usually silently | Yes, and usually silently |
Inclusion rule. The two places a page carries a language declaration, compared on what each one describes and who reads it. Order. Fixed order, the own-language attribute first.
1It describes the page rather than the set
A page declaring itself as one language and listing alternates in others is doing two different things. The first is a description; the second is a map. Counting the map gives a set size, and reading the description tells you whether one address is what it claims.
That makes this attribute the natural thing to look at during a spot check. It is what a screen reader uses to pick a pronunciation, so a page that lies about it is mispronounced to the readers least able to work around it.
2Why a spot check looks at it and at the words
The attribute alone is not enough, because a machine-swapped page can carry the correct one. So a check reads both: the attribute, and whether the navigation and headings are actually in that language.
Two checks of that kind appear in this register, on two vendors and two kinds of page. Both came back as real translations, which is weak evidence and better than assuming either way.
3Not part of any count here
This attribute is never counted. A site could declare the right language on every page and declare no alternates at all, and the column would read empty, because the column measures the map rather than the pages.
That is a stated limitation rather than an oversight. A rule that tried to count undeclared translations would need to crawl an entire site, and nobody reading a register could repeat it.
A definition, not a measurement: no vendor figure appears here that is not also in the register. The spot checks are recorded on the vendor entries they were performed on.
Nearby terms: x-default, Locale. The whole vocabulary is at terms; nothing on this page is a claim about a named product.