dir - HTML CSS HTML Global Attribute

HTML CSS examples for HTML Global Attribute:dir

Introduction

The dir attribute specifies the direction of an element's text.

The two supported values are ltr (for left-to-right text) and rtl (for right-to-left text).

Demo Code

ResultView the demo in separate window

<!DOCTYPE HTML>  
<html>  
    <head>      
        <title>Example</title>  
    </head>  
    <body>  
        <p dir="rtl">This is right-to-left</p>  
        <p dir="ltr">This is left-to-right</p>  
    </body>  
</html>  <!--   w w  w  .  ja v  a 2  s .c  o m-->

Related Tutorials