CSS direction property
Description of property definition and use
The direction property specifies the text direction/writing direction.
Default: | ltr |
---|---|
Inherited: | yes |
Version: | CSS2 |
JavaScript syntax: | object .style.direction="rtl" |
Browser support
The numbers in the table support the first browser version number of the property.
The number immediately before -webkit-, -ms- or -moz- is the first browser version number that supports the prefix property.
Attributes | |||||
---|---|---|---|---|---|
direction | 2.0 | 5.5 | 1.0 | 1.3 | 9.2 |
The property value
Value | Describe |
---|---|
ltr | Default. The text direction is from left to right. |
Rtl | The text direction is right-to-left. |
inherit | Specifies that the value of the direction property should be inherited from the parent element. |
Related articles
CSS tutorial: CSS Text