HTML DOM dir property
Definition and Usage
The dir property sets or returns the text direction of an element.
Syntax
HTMLElementObject.dir=
text-direction
Browser support





All major browsers support the dir property
Example
Example
Return the text direction of the body element:
Try it »
Element object