CSS Text Direction
The direction CSS property sets the direction of text, table columns, and horizontal overflow. Use rtl for languages written from right to left (like Hebrew or Arabic), and ltr for those written from left to right (like English and most other languages).
The direction property is used to change the horizontal text direction of an element.
div {
direction: ltr; /* Default, text read read from left-to-right */
}
div {
direction: rtl; /* text read from right-to-left */
}
div {
writing-mode: horizontal-tb; /* Default, text read from left-to-right and top-to-bottom. */
}
div {
writing-mode: vertical-rl; /* text read from right-to-left and top-to-bottom */
}
div {
writing-mode: vertical-lr; /* text read from left-to-right and top to bottom */
}
The direction property is used to change the horizontal text direction of an element.
Syntax: direction: ltr | rtl | initial | inherit;
The writing-mode property changes the alignment of text so it can be read from top-to-bottom or from left-to-right, depending on the language.
Syntax: direction: horizontal-tb | vertical-rl | vertical-lr;