Interpretation and provision of the dir attribute in HTML5-

Source: Internet
Author: User
In HTML5's interpretation and provision of the dir attribute, ltr: left-to-left. Rtl: from right to left ......,.

Explanation and provision of dir attribute in HTML5

Ltr: left-side.
Rtl: from right to left.
Auto: It is determined automatically based on the text content and is not accurate. It is not recommended unless you have.

The dir attribute of the element is used to define the text layout direction of the element.
You can set the following values:
When the dir attribute is not set for the bdi element, it is consistent with the setting of auto.
When the dir attribute is not set for the root element, the result is consistent with that set to ltr.
The dir attribute is not set for the element. When its parent element sets the dir attribute, the dir attribute of the parent element is referenced.
Compared with the CSS method, the HTML5 standard encourages you to set the dir attribute to achieve the typographical effect (for example, the search engine may not capture css files ).

Ngines ).

The above is the explanation and provision of the dir attribute in HTML5. For more information, see PHP Chinese website (www.php1.cn )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.