Tutorials Point


  CSS Home

  CSS Reference
  Pseudo Classes & Elements

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

CSS - direction


previous next AddThis Social Bookmark Button


Advertisements

Description:

The direction indicates the writing direction to be used in the rendering of an element.

Possible Values:

  • ltr: element will be rendered from left to right
  • rtl: element will be rendered from right to left

Applies to:

All the HTML elements.

DOM Syntax:

object.style.direction="ltr";

Example:

Here is the example:

<p style="direction:rtl;">
Right-to-left rendering direction - Example
</p>

<p style="direction:ltr;">
Left-to-right rendering direction - Example
</p>

This will produce following result:

Right-to-left rendering direction - Example

Left-to-right rendering direction - Example

To Become more comfortable - Do Online Practice



previous next Printer Friendly

Advertisements


  

Advertisements