Global Attributes
dir="ltr"
Sets the base direction to left-to-right, suitable for English and many other languages. This affects bidirectional text ordering, not just alignment. 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="ltr"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| dir | keyword | Sets the base direction to left-to-right, suitable for English and many other languages. This affects bidirectional text ordering, not just alignment. |
Working Example
Example Snippethtml
<p dir="ltr">Hello, world!</p>