What is the CSS direction property?
The direction property in
Syntax
direction: ltr|rtl|initial|inherit;
Property values
-
ltr: ltr means left to right. It is the default value. It moves the text from left to right. -
rtl: rtl means right to left. It moves the text from right to left. -
initial: sets the value to its default value. -
inherit: inherits the property from its parent value.
Code
The basic direction property is as follows:
Explanation
In this example, we write a code with the open and close quote property. We set the direction of the text from right to left. We can also set the direction of the text from left to right.