dir Attribute

Description

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.

Example


<!DOCTYPE HTML>
<html>
<body>
<p dir="rtl">This is right-to-left</p>
<p dir="ltr">This is left-to-right</p>
</body><!--  ww w .j a  v  a2  s.c  o  m-->
</html>

Click to view the demo





















Home »
  HTML CSS »
    HTML »




HTML Introduction
HTML Document
HTML Section
HTML Group Content
HTML Text Marker
HTML Table
HTML Form
HTML Embed