How to define the language of the page?
lang attribute to the
html element with a valid language code.
For english this would be:
<html lang="en"> <!-- content --> </html>
Valid language codes are either two-letter or three-letter language codes. You can find the list of valid language codes in the ISO 639-1 code list.
Why is this important?
The use cases for the
<html lang> attribute are:
- Screen readers
- Translation such as Google Translate
- Localized date and time input
It is crucial to define a valid lang attribute on the
A screen reader uses the
lang attribute to select the corresponding language to speak the text if that language is available.
Free Website Accessibility Audit
We are sorry to hear that you are not satisfied with the content on this page.
Checkout the ExcellentWebCheck services
ExcellentWebCheck's goal is to improve the online user experience. The tools of ExcellentWebCheck help to detect and improve usability problems on your website.