Specifying Text Direction

Description

The direction property controls the directionality of text. It can have two values:ltr rtl.

Example

You can see a simple of the direction property in the following code.


<!DOCTYPE HTML>
<html>
<head>
<style>
#first {<!--   w  ww. j a  v a 2s  . co  m-->
    direction: ltr;
}

#second  {
    direction: rtl;
}
</style>
</head>
<body>
    <p id="first">
        This  is left-to-right text
    </p>
    <p id="second">
        This  is right-to-lefttext
    </p>
</body>
</html>

Click to view the demo





















Home »
  HTML CSS »
    CSS »




CSS Introduction
CSS Background
CSS Border
CSS Box Layout
CSS Text
CSS Font
CSS Form
CSS List
CSS Selectors
CSS Others
CSS Table