Black Lives Matter! ✊🏾


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. The lang and xml:lang attributes

Links about lang

  1. WebAIM: Document and Content Language

    posted on

  2. The lang attribute: browsers telling lies, telling sweet little lies

    posted on by Manuel Matuzović

    The lang attribute is an essential component in the basic structure of an HTML document. It’s important that we set it correctly.

  3. CSS for internationalisation

    posted on by Chen Hui Jing

    I’ve come across people who do not think that CSS is related to internationalisation at all, but if you think...

  4. On Use of the Lang Attribute

    posted on by Adrian Roselli

    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…

  5. <html> element must have a lang attribute Axe Rules | Deque University | Deque Systems

    by Deque University

  6. lang

    posted on by MDN

    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">
<p>There's a certain <i lang="fr">je ne sais quoi</i> in the air.</p>