
HTML lang Attribute - W3Schools
The lang attribute specifies the language of the element's content. Common examples are "en" for English, "es" for Spanish, "fr" for French and so on.
What is the 'lang' attribute of the <html> tag used for?
Jul 7, 2019 · Always use a language attribute on the html tag to declare the default language of the text in the page. When the page contains content in another language, add a language …
lang - HTML: HyperText Markup Language | MDN - MDN Web Docs
Mar 13, 2025 · The lang global attribute helps define the language of an element: the language that non-editable elements are written in, or the language that the editable elements should be …
Declaring language in HTML - World Wide Web Consortium (W3C)
In addition to specifying how to use simple language tags, such as en for English or fr for French, BCP 47 describes how to compose language tags that allow you specify regional dialects, …
HTML ISO Language Code Reference - W3Schools
You should always include the lang attribute inside the <html> tag, to declare the language of the Web page. This is meant to assist search engines and browsers:
Accessibility at Penn State | Language Tags in HTML
Jul 17, 2024 · Use the LANG tag to mark words or passages of text in another language. This works for major languages only. Consider supplementing language changes with a textual …
Language tags in HTML and XML - World Wide Web Consortium …
Mar 3, 2014 · Use the lang attribute to specify language tags in HTML, and the xml:lang attribute for XML. In both cases, language information is inherited by elements inside the one where the …
HTML lang Attribute - GeeksforGeeks
Aug 29, 2024 · This attribute is used to specify the language of the element content. Some examples of languages are en for English, es for Spanish, etc. Syntax: <element lang = …
HTMLElement: lang property - Web APIs | MDN - MDN Web Docs
Feb 13, 2025 · The lang property of the HTMLElement interface indicates the base language of an element's attribute values and text content, in the form of a RFC 5646: BCP 47 language …
HTML Lang Attribute: What Is It? Why Is It Important?
Jul 12, 2022 · The HTML lang attribute tells search engines what language a website or a section of a webpage is. In this article you will learn the exact specifics of the HTML lang attribute, …