HTML attribute dir that specifies the text direction of element content

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

Example

A paragraph with a direction from right to left:

Write this text right-to-left!

Copy after login

Browser support

All browsers support dirAttribute.

Definition and Usage

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

Tips andNotes

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


,