HTML Base Document Language


Example

It’s a good practice to declare the primary language of the document in the html element:

<html lang="en">

If no other lang attribute is specified in the document, it means that everything (i.e., element content and attribute text values) is in that language.

If the document contains parts in other languages, these parts should get their own lang attributes to "overwrite" the language declaration.