HTML DOM Element dir
HTML DOM Element dir Property
The dir property is used to either set or return an element dir attribute. This attribute is basically used for text-direction.
Syntax:-
Its syntax is:- element.dir OR element.dir = "ltr|rtl|auto"
Return:-
Its return is:- string having text direction of the element
Further Explanation:-
Value | Description |
ltr | Left-to-right text direction. |
rtl | Right-to-left text direction. |
auto | Let the browser decide. |