CSS text-orientation Property
Description
The text-orientation CSS property controls how individual glyphs are drawn when text is laid out in a direction that is not purely horizontal — most commonly in vertical writing modes. It determines whether characters are rendered upright, rotated to follow the line progression, or presented using their vertical alternates when such alternates exist in the font. The property operates at the glyph level, influencing the visual orientation of letters, numbers, punctuation and other inline characters without changing the line flow itself.
The property is meaningful primarily when the document uses a vertical flow; it works together with the writing direction rules established by writing-mode. For example, some scripts and fonts provide dedicated vertical glyph forms (vertical alternates) for ideographs and punctuation. Depending on the chosen orientation behavior, a renderer may use those vertical alternates, keep Latin letters upright, or rotate glyphs to match the line axis. This can change how punctuation aligns with text runs, how multi-character clusters are perceived, and whether characters that lack vertical forms are visually rotated by the user agent.
In practice this property affects text shaping and spacing: rotated glyphs can change the apparent line height and the position of baselines, and vertical alternates may occupy different metrics than their horizontal counterparts. It can be combined with other typographic features such as text-combine-upright (for stacking characters in a single-em box) and visual transforms like transform on containers — note that the order and semantics differ: the property instructs the text shaping engine how to choose and orient glyphs, whereas transforms modify the already-rendered result. Designers should be mindful of readability for mixed-script content and test how punctuation, numerals and Latin text are presented in vertical contexts, since these choices have direct effects on legibility and typographic correctness in East Asian and other vertical-writing scenarios.
Definition
- Initial value
- mixed
- Applies to
- All elements except table row groups, rows, column groups, and columns
- Inherited
- Yes
- Computed value
- Specified value
- Animatable
- No
- JavaScript syntax
- object.style.textOrientation
Interactive Demo
Syntax
text-orientation: mixed | upright | sideways-right | sideways | use-glyph-orientation
Values
- mixedIn vertical mode, characters rotate 90° clockwise.
- uprightIn vertical mode, characters are placed naturally under each other.
- sidewaysCauses characters to be laid out as they would be horizontally, but with the whole line rotated 90° clockwise.
- sideways-rightAn alias to sideways that is kept for compatibility purposes.
- use-glyph-orientationOn SVG elements, this keyword leads to use the value of the deprecated SVG properties glyph-orientation-vertical and glyph-orientation-horizontal.
Example
Browser Support
The following information will show you the current browser support for the CSS text-orientation property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
