3.1. Provide the primary language of the page with the lang attribute on the <html> tag

In order to ensure good rendering of text content, the primary language must be declared on each page.

Use the lang attribute on the <html> tag.

For example, for an English page use:

<html lang="en">

Tip

To populate the lang attribute, a two-letter language code (or, if it is not available, three-letter code) must be used.

Some common codes are:

  • en for English.
  • fr for French.
  • es for Spanish.
  • de for German.
  • it for Italian.

The others are available here: exhaustive list of authorized language codes.

Find out more

Comments

Add a comment

Required fields are marked *.

Back to top