HTML attribute dir that specifies the text direction of element content

黄舟
Release: 2017-11-03 10:17:26
Original
2222 people have browsed it

Example

A paragraph with a direction from right to left:

<p dir="rtl">Write this text right-to-left!</p>
Copy after login

Browser support

All browsers support dir Attribute.

Definition and Usage

The dir attribute specifies the text direction of the element content.

Tips and Notes

Note: The dir attribute is not valid in the following tags: ,
, , ,


,