This translation has not been editorially reviewed yet. The German version is authoritative. Deutsche Fassung
SEO
What is the language declaration in a website's HTML for?
The language declaration in HTML — the lang attribute — tells programs what language a page's text is written in. It sits right at the start of the source code, and is invisible to visitors. Screen readers choose their pronunciation based on this declaration: if it's missing, German text sometimes gets read out with English pronunciation rules, and is barely understandable.
Screen readers choose their pronunciation based on the language declaration
Blind and severely visually impaired people have websites read out by a screen reader. To do so, the program has to know what language it's speaking: the German word "Kunde" sounds completely different when pronounced by English rules. This is exactly the information the language declaration in the source code provides. If it says "de" for German, the program reads with German stress and pronunciation. If the declaration is missing, the program falls back to a default setting — often English. German text then gets pronounced word for word in English, and is tiring to incomprehensible even for experienced listeners.
Search engines and translators use the declaration too
The language declaration doesn't just help with reading aloud. Search engines use it as one of several signals to match a page to the right language region — a page marked up as German belongs in German-language search results. Browsers offer the right translation based on the declaration: if a French-speaking user visits your German page, their browser can correctly suggest "Translate from German". And hyphenation programs break words according to the rules of the declared language. Our check verifies on every page whether the declaration is present; its absence counts as a moderate shortcoming, and is fixed with a single word in the source code.
- Ask your agency to check whether the language declaration is set in every page's source code — "de" for German pages.
- For multilingual websites, make sure every language version carries its own, correct declaration.
- Also mark longer foreign-language passages within a page with their own language.
- Add the language declaration to the sign-off checklist for every new website.




