October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

CSS text-orientation: How to Control Text Direction

Use writing-mode to establish vertical text flow and text-orientation to decide whether characters appear mixed, upright, or sideways.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
.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
Sale
HTML and CSS: Design and Build Websites
  • 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Directionality and inheritance details

  • text-orientation is inherited and has an initial value of mixed.
  • 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 upright forces the used direction value to ltr, 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
Sale
Web Design with HTML, CSS, JavaScript and jQuery Set
  • 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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for 1,000 free screenshots a month, with no card required.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.