The HTML dir attribute specifies the direction that content is going in the element. It is usually used to insert foreign language content into a document with a language that is read in the opposite direction.
HTML Code ExampleMake the content flow right-to-left.
<p dir="rtl">Content in the element</p>
Possible Valuesltr - left to right. rtl - right to left. auto - automatically determine the direction.
element.dir = "rtl";