Traditional typesetting across the Sinosphere — Korea, China, Japan — ran vertically. It suited tall formats like scrolls and hanging banners, and matched the stroke order of brush calligraphy. It still survives in some Japanese novels and newspapers, Korean folding screens and carved signboards, and vertical shop signs.
CSS's `writing-mode` property controls this direction. `vertical-rl` writes vertically with lines stacking right to left (the traditional East Asian direction); `vertical-lr` stacks lines left to right (used for scripts like Mongolian). In vertical mode, the logical meaning of `width`/`height` and `margin-top/bottom` vs `margin-left/right` effectively swaps, so logical properties like `margin-block`/`margin-inline` keep the same code working in either mode.
Mixing Latin letters or digits into vertical text rotates them 90° by default; `text-orientation: upright` keeps them standing upright and stacked top-to-bottom instead. Punctuation like quotation marks and commas rotates automatically to match the vertical direction too.
When to use
Use for calligraphy- or signboard-inspired branding, Japanese-language content, or narrow tall banners. Horizontal remains the default for ordinary UI and body text.