You can set text direction in HTML in one of two ways: With the HTML dir attribute.
...
Attribute Values.
Value | Description |
---|---|
ltr | Default. Left-to-right text direction |
rtl | Right-to-left text direction |
auto | Let the browser figure out the text direction, based on the content (only recommended if the text direction is unknown) |
How do you make a direction in HTML?
Add dir="rtl" to the html tag any time the overall document direction is right-to-left (RTL). This sets the default base direction for the whole document.
What is LTR and rtl in HTML?
ltr , which means left to right and is to be used for languages that are written from the left to the right (like English); rtl , which means right to left and is to be used for languages that are written from the right to the left (like Arabic); auto , which lets the user agent decide.