To control how characters appear in vertical text, set writing-mode to a vertical value, then choose a text-orientation value. For example, writing-mode: vertical-rl creates vertical flow, while text-orientation: upright keeps the characters upright. text-orientation does not make ordinary horizontal text vertical on its own.
What text-orientation controls
text-orientation controls the orientation of characters within a line when the text is in a vertical writing mode. It works alongside writing-mode and direction, which together affect the layout and ordering of text.
The properties have distinct jobs: writing-mode establishes whether lines flow horizontally or vertically and how block flow proceeds; text-orientation controls how glyphs appear within vertical text. Set the writing mode first, then select the character orientation that fits the content.
How to keep text upright vertically in CSS
Apply a vertical writing mode and then set the characters upright:
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →#1 Best Overall
.vertical-label {
writing-mode: vertical-rl;
text-orientation: upright;
}
Use the class on an element containing the text you want to lay out vertically. The vertical-rl value establishes vertical line flow; upright keeps the glyphs upright within that flow.
Choose a text-orientation value
| Value | Effect | When it fits |
|---|---|---|
mixed |
The initial value. Uses Unicode vertical-orientation data to determine which typographic character units stay upright and which are typeset sideways. | Mixed-script vertical typesetting when characters should follow their orientation data. |
upright |
Keeps glyphs upright. It treats all characters as left-to-right and forces the used direction value to ltr. |
Vertical text where upright glyphs are wanted and that directionality behavior is acceptable. |
sideways |
Lays out characters horizontally and rotates the whole line 90 degrees clockwise. | Text that should read as a rotated horizontal line in vertical flow. |
sideways-right |
An alias retained for compatibility. | Existing styles that use the compatibility alias; sideways is the current value to use. |
For mixed-orientation text, the CSS Writing Modes specification explains that Unicode’s Vertical_Orientation property guides whether a typographic character unit is upright or sideways. The specification also notes: “Scripts without a native vertical orientation can be either rotated (set sideways) or translated (set upright): the transform used is a stylistic preference depending on the text’s usage, rather than a matter of correctness.”
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
How to rotate English text in vertical writing
To rotate a line of text clockwise within vertical writing, use sideways:
.rotated-label {
writing-mode: vertical-rl;
text-orientation: sideways;
}
Choose mixed instead if characters should follow their Unicode vertical-orientation data rather than rotating the entire line uniformly. Choose upright if all glyphs should remain upright.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteRank #3
Directionality and inheritance details
text-orientationis inherited and has an initial value ofmixed.- It applies to all elements except table row groups, rows, column groups, and columns.
- The computed value is the specified value, and the property is not animatable.
- Because
uprightforces the useddirectionvalue toltr, check its effect when working with bidirectional text.
CSS writing modes support international text layouts, including left-to-right and right-to-left ordering and vertical orientation. Chinese, Japanese, and Korean are examples of languages that can be written vertically.
Browser support
MDN classifies text-orientation as Baseline Widely available and reports it available across browsers since September 2020. That broad summary applies to this property; it does not establish identical support for every writing-mode value or related feature. Check the target browsers’ compatibility information for the exact writing-mode behavior your layout needs.
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Troubleshooting vertical text
The text stays horizontal
text-orientation controls glyphs within vertical text; it does not establish vertical flow. Add an appropriate vertical writing-mode value, such as vertical-rl.
Characters do not all look the same way
If the value is mixed, that is expected: Unicode vertical-orientation data determines which units remain upright and which are sideways. Set upright for upright glyphs or sideways to rotate the line.
Recommended Free Tools
Best Value
Bidirectional text behaves unexpectedly
Check whether text-orientation: upright is forcing the used direction to ltr. If that is unsuitable for the content, choose an orientation and writing-mode combination that meets the required directionality.
A script needs counterclockwise rotation
The CSS Writing Modes specification cautions that Unicode’s Vertical_Orientation property does not handle scripts that rotate 90 degrees counterclockwise in vertical contexts. For those specialist cases, it advises using writing-mode: sideways-lr.
Or skip the browser setup
If your task is to capture a page showing your CSS layout, ScreenshotNeo can return a screenshot or PDF through one GET request. For example, using cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for request options. It accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides screenshot tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000.
Sign up for 1,000 free screenshots a month, with no card required.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




