Skip to content
Related Articles

Related Articles

Improve Article

CSS | direction Property

  • Last Updated : 08 Aug, 2019

The direction property specifies the direction of the text/writing within any block element. It can have two values rtl(right to left) or ltr( left to right)


element_selector {
    direction: rtl|ltr|initial|inherit;

Property values:

  • rtl: Specifies the direction as right to left.
  • ltr(default): Specifies the direction as left to right which is also the default direction.
  • initial: Sets the property to its default value.
  • inherit: Inherits the property from the parent element.


<!DOCTYPE html>
        CSS | direction Property
        html {
            color: green;
        .rtl {
            direction: rtl;
        .ltr {
            direction: ltr;
    <p>This text goes from left to right. This is default.</p>
    <p class="ltr">This text goes from left to right.</p>
    <p class="rtl">This text goes from right to left.</p>


Supported Browsers: The browsers supported by direction property are listed below:

  • Google Chrome 2.0
  • Internet Explorer 5.5
  • Firefox 1.0
  • Opera 9.2
  • Apple Safari 1.3
My Personal Notes arrow_drop_up
Recommended Articles
Page :