writing-mode

The writing-mode CSS property sets whether lines of text are laid out horizontally or vertically, as well as the direction in which blocks progress. When set for an entire document, it should be set on the root element (html element for HTML documents).

Example

Initial value horizontal-tb
Applies to all elements except table row groups, table column groups, table rows, and table columns

Syntax

  
writing-mode: vertical-rl;
  

Values

For ltr scripts, content flows horizontally from left to right. For rtl scripts, content flows horizontally from right to left. The next horizontal line is positioned below the previous line.
For ltr scripts, content flows vertically from top to bottom, and the next vertical line is positioned to the left of the previous line. For rtl scripts, content flows vertically from bottom to top, and the next vertical line is positioned to the right of the previous line.
For ltr scripts, content flows vertically from top to bottom, and the next vertical line is positioned to the right of the previous line. For rtl scripts, content flows vertically from bottom to top, and the next vertical line is positioned to the left of the previous line.
For ltr scripts, content flows vertically from bottom to top. For rtl scripts, content flows vertically from top to bottom. All the glyphs, even those in vertical scripts, are set sideways toward the right.
For ltr scripts, content flows vertically from top to bottom. For rtl scripts, content flows vertically from bottom to top. All the glyphs, even those in vertical scripts, are set sideways toward the left.
Deprecated except for SVG1 documents. For CSS, use horizontal-tb instead.
Deprecated except for SVG1 documents. For CSS, use horizontal-tb instead.
Deprecated except for SVG1 documents. For CSS, use horizontal-tb instead.
Deprecated except for SVG1 documents. For CSS, use vertical-lr instead.
Deprecated except for SVG1 documents. For CSS, use vertical-lr instead.
Deprecated except for SVG1 documents. For CSS, use vertical-rl instead.

Browser support

writing-mode48124193510.1
horizontal_vertical_values487943359
sideways_values43
svg_values48124393510.1

We use cookies to improve your experience. Learn more in our Privacy policy.

×