CSS writing-mode
property specifies whether the lines of text should be written horizontally or vertically along with the direction of the text. Refer to the example below:
Example:
.p1{ writing-mode: horizontal-tb; } .p2{ writing-mode: vertical-lr; } .p3{ writing-mode: vertical-rl; }
CSS Syntax
The writing-mode
property has the following syntax:
writing-mode: horizontal-tb|vertical-lr|vertical-rl;
Property Values
The writing-mode
property accepts the following values:
horizontal-tb | The text flows horizontally left to right and vertically top to bottom. This is the default value. |
vertical-lr | The text flows vertically top to bottom and horizontally left to right. |
vertical-rl | The text flows vertically top to bottom and horizontally right to left. |
initial | Sets the writing-mode property to its default value(horizontal-tb). |
inherit | Inherits the writing-mode property from the parent element. |
General Info
Default Value | horizontal-tb |
Inherited | Yes |
JavaScript Usage | element.style.writingMode = “vertical-lr” |