CSS writing-mode
The CSS writing-mode property specifies whether lines of text are laid out horizontally or vertically and the direction in which blocks progress.
Note that the content of replaced elements do not rotate due to the writing mode: images and external content such as from iframes, for example, remain upright, and the default object size of 300px×150px does not re-orient.
Syntax
Which means that it can be any of those values.
In other words, it can be any of the following:
Possible Values
Below is an explanation of the values.
horizontal-tb- Top-to-bottom block flow direction. Both the writing mode and the typographic mode are horizontal.
vertical-rl- Right-to-left block flow direction. Both the writing mode and the typographic mode are vertical.
vertical-lr- Left-to-right block flow direction. Both the writing mode and the typographic mode are vertical.
sideways-rl- Right-to-left block flow direction. Both the writing mode and the typographic mode are horizontal.
sideways-lr- Left-to-right block flow direction. Both the writing mode and the typographic mode are horizontal.
In addition, all CSS properties also accept the following CSS-wide keyword values as the sole component of their property value:
initial- Represents the value specified as the property's initial value.
inherit- Represents the computed value of the property on the element's parent.
unset- This value acts as either
inheritorinitial, depending on whether the property is inherited or not. In other words, it sets all properties to their parent value if they are inheritable or to their initial value if not inheritable.
Basic Property Information
- Initial Value
horizontal-tb- Applies To
- All elements except table row groups, table column groups, table rows, table columns, ruby base container, ruby annotation container
- Inherited?
- Yes
- Animatable
- Not animatable
CSS Specifications
The writing-mode property is defined in CSS Writing Modes Level 4.
Browser Support
Browser support for CSS properties can vary, particularly for newer or experimental features. Check current browser compatibility before using a property in production, especially when supporting older browsers.
Initial Value
CSS properties have an initial value that applies when the property has not been explicitly set. The initial value is different from the value inherited from a parent element and may vary between properties.
Inheritance
Some CSS properties inherit their computed value from their parent element by default, while others do not. The inherit, initial, unset, and revert keywords can also be used to control how a property gets its value.
Vendor Prefixes
Most modern CSS properties use the standard, unprefixed syntax. Vendor-prefixed properties such as -webkit- are mainly relevant to older browser versions or specific features and should only be used when required by your browser support targets.