langattribut
The lang attribute, sometimes referred to as langattribut in some languages, is a global HTML and XML attribute that specifies the language of an element’s content. It takes an IETF BCP 47 language tag, such as en, en-US, fr, es-419, or zh-Hans-CN. The value guides user agents and tools about the language in which the text is written. The attribute is commonly placed on the html element to declare the document language, but it can be applied to any element to indicate a language switch for its content. The attribute is inheritable, so descendants adopt the nearest defined language unless overridden.
Its practical effects include improved accessibility, as screen readers adjust pronunciation and voice selection; better spell
In HTML5, lang is the standard global attribute; in XHTML or older XML-based formats, xml:lang may also