HTML · Global attributes

lang

Declares the content language. Helps screen readers pronounce text and helps search engines.

Syntax
lang="en"

Example

Try it

Notes

Set lang on html and override it on foreign-language passages.

More in this group

accesskey aria-atomic aria-controls aria-current aria-describedby aria-disabled aria-expanded aria-hidden

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course