Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS writing-mode property

CSS writing-mode property

Example

The table below shows the different writing modes:

.example

.Text1

span

,

.example

.Text1

{

writing-mode:

horizontal-tb

; -

webkit-writing-mode:

horizontal-tb

; -

ms-writing-mode:

horizontal-tb

;

}

.example

.Text2

span

,

.example

.Text2

{

writing-mode:

vertical-lr

; -

webkit-writing-mode:

vertical-lr

; -

ms-writing-mode:

vertical-lr

;

}

.example

.Text3

span

,

.example

.Text3

{

writing-mode:

vertical-rl

; -

webkit-writing-mode:

vertical-rl

; -

ms-writing-mode:

vertical-rl

;

}

.example

.Text4

span

,

.example

.Text4

{

writing-mode:

sideways-lr

; -

webkit-writing-mode:

sideways-lr

; -

ms-writing-mode:

sideways-lr

;

}

.example

.Text5

span

,

.example

.Text5

{

writing-mode:

sideways-rl

; -

webkit-writing-mode:

sideways-rl

; -

ms-writing-mode:

sideways-rl

;

}

Try it »


Property definition and usage

The writing-mode property defines how text is laid out in horizontal or vertical directions.

The syntax format is as follows:

writing-mode: horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr


Browser support

The numbers in the table indicate the first browser version that supports this property.

property
writing-mode 8.0 6.0 41.0 5.1 15