HTML dir attribute
Example
A bdo element with a specified text direction:
The text in this paragraph is displayed from right to left.
Try it »
Browser support

All major browsers support the dir attribute.
Definition and Usage
The required dir attribute specifies the direction of the text in the element.
Differences between HTML 4.01 and HTML5
NONE.
Syntax
Attribute values
| Value | Description |
|---|---|
| ltr | Text direction from left to right. |
| rtl | Text direction from right to left. |
HTML tag