text direction of an element


dir=""

Browser
Internet Explorer Firefox Opera7

The dir attribute specifies the text direction of an element.

This attribute can be used in most elements.


<p dir="ltr"> - </p>


Attribute Value Explanation
dir=" " ltr from left to right (English, etc ...)
rtl from right to left (Arabia, Hebrew ...)

Example

<p dir="ltr">Example of English text.</p>

<p dir="rtl">The direction from the right to the left.</p>
Output

Example of English text.

The direction from the right to the left.