The village’s volunteer welcome page: the browser answers the lang that rules each run through :lang(), the <q> quotes and hyphens: auto it picks, and Putar…
Many think lang is just for SEO. In fact it decides the screen reader’s voice (NVDA, VoiceOver, TalkBack), hyphens: auto hyphenation, the marks of <q>, :lang() rules and the spelling dictionary. A missing or wrong <html lang> is always a WCAG audit finding (3.1.1 Language of Page, 3.1.2 Language of Parts).
A text’s language = the nearest lang above it
lang is only for SEO / Google Its biggest effect is on screen readers: they pick voice and pronunciation from lang. A wrong lang = the page read in the wrong accent. Hyphenation, the marks of <q> and the browser’s spelling dictionary follow too.<i lang="fr">déjà vu</i>, <span lang="en">deadline</span>, <blockquote lang="ar">. Loanwords that are Indonesian by now need no mark.lang="indonesia" works as if there were no lang lang must be a BCP 47 tag: id, en, en-US, fr. "indonesia" is ill-formed (a language subtag is at most 8 letters), so it is ignored and :lang(id) does not match. Check with Intl.getCanonicalLocales(tag): a RangeError means the tag is wrong.lang from <html> Every text’s language plate turns to "?", and :lang(id) stops matching.lang="indonesia" Intl.getCanonicalLocales throws a RangeError: a language subtag is at most 8 letters.<q lang="fr"> gets other marks than the neighbourhood head’s <q>: the browser picks them from the element’s language.