Each part of a webpage has a default human language assigned.
If your website has content in a different language to its main one, you should tell your users about the change.
This helps browsers render the content correctly and assistive technology, such as screen readers, to interpret content accurately.
How to Pass ‘Language of Parts’
- Set the default language of each webpage using the “lang” HTML attribute; and
- Add a further “lang” attribute to content that is not in the main language.
- Words that have become part of the main lexicon (for example, ‘rendezvous’ is used in English but is of French origin).
- Proper names.
- Technical terms.
- Words of indeterminate language.
‘Language of Parts’ Tips
If you have an alternative language version or translation of some content, link to it with the name of the language (for example, ‘Francais’, ‘Deutsch’) and add a “lang” tag to the link.
Free Developer Resources
Join over 3,700 subscribers on my weekly web accessibility email and get free developer resources like WCAG Checklists and special offers.
Over 600 developers like you have learned more about the Web Content Accessibility Guidelines with my guidebook.