Global Attributes
dir="rtl"
Sets the base direction to right-to-left, for example for Persian or Arabic text. Latin words and numbers can still form left-to-right runs within the paragraph. Global enumerated attribute; absent or invalid values normally inherit direction (bdi has a special auto default). Use lang separately.
Formal Syntax & Structure
html syntaxhtml
dir="rtl"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| dir | keyword | Sets the base direction to right-to-left, for example for Persian or Arabic text. Latin words and numbers can still form left-to-right runs within the paragraph. |
Working Example
Example Snippethtml
<p dir="rtl">سلام دنیا</p>