lang
The lang attribute (in no namespace) specifies the primary language for the element’s contents and for any of the element’s attributes that contain text. 3.2.5.2. The lang and xml:lang attributes
Links about lang
The lang attribute: browsers telling lies, telling sweet little lies
The lang attribute is an essential component in the basic structure of an HTML document. It’s important that we set it correctly.
CSS for internationalisation
I’ve come across people who do not think that CSS is related to internationalisation at all, but if you think...
On Use of the Lang Attribute
Way back in October I noticed this WHATWG HTML bug (26942) where someone asked why do these examples of <html> lack the lang attribute? I thought the answer from Hixie was a bit dismissive and not based on any data or real-world benefits of use, particularly in the context of…
Tags:lang
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 written in by the user. The attribute contains a single “language tag” in the format defined in Tags for Identifying Languag…
Code samples
<html lang="ru">
</html>
<p>There's a certain <i lang="fr">je ne sais quoi</i> in the air.</p>
Explore other pages
- multiple
Enables form controls to accept one or more values.
- content-visibility
Controls whether or not an element renders its contents at all.
- position: sticky
Makes an element stick.
- :nth-child()
Represents an element that has an+b-1 siblings before it in the document tree.