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 (m.sbmmt.com) for more related content!