Ge the language code of a <p> element:
The result of x will be:
The lang property sets or returns the value of the lang attribute of an element.
The lang attribute specifies the language code of the element's content.
Property | |||||
---|---|---|---|---|---|
lang | Yes | Yes | Yes | Yes | Yes |
Return the lang property:
Set the lang property:
Value | Description |
---|---|
language_code | Specifies the language code for the element's content. Language code reference |
Return Value: | A String, representing the language of the element's text |
---|
HTML reference: HTML lang Attribute