Every web page must have a default language. The default language is the language in which the content on the page is displayed. The ‘lang’ attribute along with the language code (eg: en for English) ensures assistive technologies such as screen readers to read accurately, user agents such as browsers to display the content appropriately.

<html lang=‘en’>

Some web pages may have multiple languages. In such cases the primary language should be marked up as mentioned above. This will be the overall page language. The specific elements or sections that have different language must have a language attribute specifically set to that content. This language in general will be different from the overall page language. Eg: The web page may be in English i.e lang=‘en’ and a specific paragraph will be in French i.e. lang=‘fr’.

<p lang=‘fr’>Content in French</p>


Names, proper nowns, content of indeterminate language and the words that have their meaning in the  immediately surrounding text are not required to have a specific language attribute.