The language of the document can be declared in the <html> tag, with the lang attribute.
HTML file:
<!DOCTYPE html>The first two letters specify the language (en). If there is a dialect, use two more letters (US).
![]() |
Declaring a language is important for accessibility applications (screen readers) and search engines. |