Example

A simple direction property example:

Laboratory

description & Usage

The direction property specifies the text direction/writing direction within a block-level element.

Informations

# Description
Default Value ltr
Inherited yes
Animatable no
Version CSS2
JavaScript syntax object.style.direction="rtl"

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
direction

Syntax

Values

Values Description
ltr Specifies the text orientation from left to right.
rtl Sets the text orientation from right to left.
initial Adds this value to its default property.
inherit It inherits this value from its parent tag.

Related Pages