Language attribute checker
Read the HTML lang attribute of a webpage and confirm the declared language.
Last submissions
What the lang attribute is
The lang attribute on the HTML element declares the natural language of a page's content. It uses standard language codes such as en for English or de for German, optionally with a region subtag such as en-US or pt-BR. Browsers, screen readers, translation tools and search engines all use this declaration to handle the page correctly.
This checker reads the lang attribute from a page and reports the declared language.
Why it matters
Screen readers rely on the language declaration to choose the correct pronunciation rules. Without it, a screen reader may read content with the wrong accent or pronunciation, making it difficult to understand. Browsers use it to offer translation and hyphenation. Search engines use it as a signal when deciding which language version of a page to show to which audience.
Interpreting the result
If a language is declared, check that it matches the actual content. A page written in English but marked with the wrong code can be mispronounced by assistive technology and mistargeted in search. If the attribute is missing, the page relies on browser heuristics, which are less reliable. Multilingual sites should declare the language correctly on each version and connect them with proper hreflang annotations.
Common mistakes
- Using a country code instead of a language code, such as uk when en-GB is intended.
- Copying a template that declares one language for all localized versions.
- Declaring a language on individual elements incorrectly or inconsistently.
- Forgetting to update the attribute after translating a page.
Practical note
The lang attribute is a simple declaration with real accessibility benefits. Review it during localization projects and whenever a template is reused for a different language. Confirm the value against the standard language code list rather than guessing.
Similar tools
Check whether a page declares its character encoding and which charset it uses.
View and verify the meta tags that a webpage exposes to search engines and browsers.
Check whether a page declares an HTML doctype and which version it uses.
Popular tools
Check which images on a page are missing alt attributes for accessibility and SEO.
Check which images on a page use lazy loading and which load immediately.
Measure the total size of a webpage, including all of its resources.
Check whether a page is blocked from search indexing by meta tags, headers or robots.txt.