HTML DOM lang property
Definition and Usage
The lang property sets or returns the language of an element.
Syntax
HTMLElementObject.lang=
language-code
Browser support





All major browsers support the lang property
Example
Example
Return the language of the element:
Output result:
Body language: en-us
An alternate way: en-us
Try it »
Element object