The dir attribute specifies the text direction of an element.
This attribute can be used in most elements.
<p dir="ltr"> - </p>
| Attribute | Value | Explanation |
|---|---|---|
| dir=" " | ltr | from left to right (English, etc ...) |
| rtl | from right to left (Arabia, Hebrew ...) |
<p dir="ltr">Example of English text.</p> <p dir="rtl">The direction from the right to the left.</p>
Example of English text.
The direction from the right to the left.