The text-orientation property sets the orientation of characters in a line. It only affects text in vertical mode—when writing-mode is not horizontal-tb.
It is inherited. The initial value is mixed. Use it for vertical scripts and for vertical table headers or labels.
Note Vertical writing mode required
In horizontal-tb, changing text-orientation has no visible effect. Set writing-mode: vertical-rl (or similar) first.
Compatibility Legacy keywords
sideways-right is an alias of sideways. use-glyph-orientation is for older SVG glyph-orientation properties—prefer the standard keywords in new CSS.
sideways-right is the same keyword for older compatibility.
How It Works
Stay in vertical mode. The writing mode still flows vertically.
Set sideways. Glyphs follow horizontal layout rules first.
Rotate the line. The whole line turns 90° clockwise.
Different from upright. Letters do not stack face-up one by one.
Edge Cases & Pitfalls
If nothing seems to rotate, check these first.
mode
Ignored in horizontal writing
With writing-mode: horizontal-tb, orientation changes are not visible.
upright
upright forces LTR
The used value of direction becomes ltr for those characters.
mixed
Script type matters for mixed
Latin and other horizontal scripts rotate; vertical scripts stay natural. Mixed content shows both behaviors.
legacy
Prefer modern keywords
Use sideways instead of sideways-right. Avoid use-glyph-orientation outside legacy SVG work.
scope
Not for table rows or columns
It applies to most elements, but not table row groups, rows, column groups, or columns.
Compatibility
Browser Support
text-orientation is a browser writing-mode property. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
text-orientation
Interoperable across modern browsers since about September 2020. Internet Explorer does not support this property.
97%Modern browsers
Google Chrome48+
Full
Mozilla Firefox41+
Full
Apple Safari14+
Full
Microsoft Edge79+
Full
Opera35+
Full
Samsung Internet5+
Full
Internet ExplorerNo
None
text-orientationWidely supported
Bottom line: Safe for modern sites. Older engines used a -webkit- prefix; IE has no support.
Remember
Key Takeaways
Role: set character orientation in vertical writing modes.
Values:mixed (default), upright, sideways.
Requires: vertical writing-mode. Inherited.
Tip:upright for stacked Latin headers; sideways for a rotated horizontal line.
One line:text-orientation decides whether vertical-mode glyphs stand upright, rotate, or follow a sideways line.
Frequently Asked Questions
It sets how characters orient in a line. It only affects text in vertical writing modes, such as writing-mode: vertical-rl.
The initial value is mixed. Horizontal-script characters rotate 90° clockwise; vertical-script characters stay natural.
Yes. In horizontal-tb, text-orientation has no visible effect. Use a vertical writing-mode to see it.
upright keeps characters standing upright in the vertical line. sideways lays characters out as in horizontal text, then rotates the whole line 90° clockwise.
Yes. upright forces the used value of direction to ltr for those characters.
It is Baseline Widely available (interoperable since about September 2020) in modern browsers. Internet Explorer does not support it. It is a browser layout property, not a Node.js feature.