The lang Attribute

The lang Attribute

Declaring a language is important for accessibility applications (screen readers) and search engines.

<!DOCTYPE html>
<html lang="en-US">
<body>

...

</body>
</html>

The language of the document can be declared in the <html> tag. The language is declared with the lang attribute.

The first two letters specify the language (en). If there is a dialect, use two more letters (US).

Related concepts

The lang Attribute — Structure map

Clickable & Draggable!

The lang Attribute — Related pages: