The lang
property sets or returns the value of an element's lang attribute.
The lang attribute specifies the element's language code, like "en" for English, "es" for Spanish, or "fr" for French.
Return the lang property:
element.lang
Set the lang property:
element.lang =
lang_code
Value | Description |
lang_code | The value for the element's lang attribute. See our Full Language Code Reference |
Type | Description |
String | The value of the element's lang attribute. |
element.lang
is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!