text-orientation
The text-orientation CSS property sets the how text is typeset within a line when the writing mode is vertical.
Overview
The text-orientation CSS property sets the how text is typeset within a line when the writing mode is vertical.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 48 | 79 | 41 | 14 | 48 | 14 | |
mixed | 48 | 79 | 41 | ≤13.1 | 48 | ≤13.4 |
sideways | 12 | 79 | 44 | 7 | 18 | 7 |
upright | 12 | 79 | 41 | ≤13.1 | 18 | ≤13.4 |
1+Supported (version) Not supported ※Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 1 item(s)
Compatibility
- Available with a vendor prefix: -webkit- (12)
Notes 1 item(s)
Compatibility
- Available with a vendor prefix: -webkit- (79)
Notes 1 item(s)
Compatibility
- Available with a vendor prefix: -webkit- (5.1)
Notes 1 item(s)
Compatibility
- Available with a vendor prefix: -webkit- (18)
Notes 1 item(s)
Compatibility
- Available with a vendor prefix: -webkit- (5)
Notes 1 item(s)
Implementation note
- Previously available under a different name: sideways-right (≤83)
Notes 1 item(s)
Implementation note
- Previously available under a different name: sideways-right (≤83)
Notes 1 item(s)
Implementation note
- Previously available under a different name: sideways-right (≤72)
Notes 1 item(s)
Implementation note
- Previously available under a different name: sideways-right (≤83)
Syntax
CSS
.vertical-text {
writing-mode: vertical-rl;
text-orientation: mixed; /* Default */
}
/* Set all characters to upright */
.upright {
writing-mode: vertical-rl;
text-orientation: upright;
} Live demo
Use cases
Using text-orientation
The text-orientation CSS property sets the how text is typeset within a line when the writing mode is vertical.
Cautions
- May not be supported in older browsers.
Accessibility
- Make sure visual changes are conveyed appropriately to assistive technology.
Related links
Powered by web-features