Text Orientation

These properties set the orientation of text.

CSS Properties

direction

Sets the direction of text (and other elements).

  • ltrtexts and other elements flow left-to-right
  • rtltexts and other elements flow right-to-left

writing-mode

Sets how line-of-text flows.

  • horizontal-tbline flows horizontally; new lines are added top-to-bottom
  • vertical-rlline flows vertically; new lines are added right-to-left
  • vertical-lrline flows vertically; new lines are added left-to-right
| LIVE PREVIEW
horizontal-tb (1)
horizontal-tb (2)
horizontal-tb (3)
vertical-rl (1)
vertical-rl (2)
vertical-rl (3)
vertical-lr (1)
vertical-lr (2)
vertical-lr (3)

text-orientation

Sets how characters are oriented within the line. (Only applicable for vertical writing.)

  • mixedvertical scripts flow naturally; horizontal scripts are rotated upright (default)
  • uprighteverything is upright
| LIVE PREVIEW
(MIXED)
私の名前はMitsuha
(UPRIGHT)
私の名前はMitsuha

text-combine-upright

Groups the combination of characters into the space of a single character. (Only applicable for vertical writing.)

Specify none or all.

| LIVE PREVIEW
平成20416

References