Skip to content
EUID Audit service & seal, Home
Get your website audited

This translation has not been editorially reviewed yet. The German version is authoritative. Deutsche Fassung

Indexing

Why must a page's language attributes agree?

Because a website declares its language in two places — in the source code (the html element's lang attribute) and in the server response (the Content-Language header) — and contradictory values make every decision built on them unreliable: search's country matching, the language choice of translation and screen-reading features, and categorisation by answer engines. Our check compares both values and reports contradictions.

Two places, one truth

The lang attribute is set by the content team or the template; the Content-Language header is set by the server or hosting. Because different parties are responsible, the two values drift apart: the source code says "de", the server says "en", because it's set to an English default. Invisible to visitors, a contradiction to machines — and depending on the service, sometimes one value wins, sometimes the other. An Austrian website does best with "de-AT" in both places: language AND region, consistently.

What the check exactly measures

The check reads the lang attribute from the source code and the Content-Language header from the server response, and compares the two. The report states both measured values — so it's immediately clear which side of the configuration needs fixing. The finding is classed as mild, but easy to resolve: a server setting or a line in the template.

  • Decide on the authoritative value — de-AT for an Austrian website — and set it in both places.
  • Check the Content-Language header after hosting moves: it's the place that most often silently changes.
  • For multilingual websites, mark up every language version with its own internally consistent value.

Deutsche Fassung dieser Seite

  • Seal Digitale Barrierefreiheit
  • Seal Daten & Recht
  • Seal Technische Qualität
  • Seal Digital Excellence
  • Seal Cyberversicherung

Audited. For a better digital future.euid.com