HTML dir attribute

HTML dir attribute

In this tutorial, we will learn about dir attribute in HTML with the help of examples.

dir attribute

The dir attribute is used to specify the text direction of the element's content.


<a dir = "rtl">......</a>

Attribute values

Value Description
ltr Default.Used to define the text direction from left-to-right direction
rtl Used to define the text direction from right-to-left direction
auto Used to define the direction based on the content

Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of dir Attribute in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML draggable Attribute.

- Related Topics