Home > Web Front-end > HTML Tutorial > The role of the dir attribute in html tags.

The role of the dir attribute in html tags.

黄舟
Release: 2016-12-22 14:52:59
Original
1779 people have browsed it

The dir attribute in the html tag is considered an international attribute. You can use the dir attribute to specify the display direction of text in the browser.

When you need to specify the directionality of the entire document or most of the document, you should use the dir attribute in the element instead of the element for two reasons:

dir attribute has two values:

ltr: left to right, default value.

rtl: From right to left, some languages, such as Hebrew or Arabic, or ancient Chinese classical Chinese, are read from right to left.

Usage examples are as follows:

Define documents that are read from left to right:

1

Define documents that are read from right to left:

1


That's it Regarding the role of the dir attribute in the html tag, please pay attention to the PHP Chinese website (www.php.cn) for more related content!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template