Definition and Usage
The dir attribute is a global attribute. It specifies the direction of element’s content.
- rtl : Value specifies right to left direction.
- ltr : Value specifies left to right direction.
- auto : Value specifies that the Direction will be set according the browser.
<p dir="rtl"> Direction of the text is Right to Left </p> <p dir="ltr"> Direction of the text is Left to Right </p> <p dir="auto"> Text direction is set according the browser </p>
Here are a few tutorials for you to read next:
If you find this tutorial helpful, then please Subscribe to our YouTube Channel for video tutorials, and share this article on social media.