Change Font Size: Previous / Next / Directory List
HTML dir attribute
Dir attribute - Definitions (text) arrangement
- Value:
- Ltr - representatives of the left-to-right sequence
- Rtl - on behalf of the right-to-left sequence
- Default: ltr
- Trackback Address: http://www.nt22.com/xhtml-html/attribute_dir/
Example
Ltr left-to-right alignment way
<htmlXmlns"http://www.w3.org/1999/xhtml"dir= = ="zh-CN""ltr"xml:lang>
Rtl right to left Alignment
<htmlXmlns"http://www.w3.org/1999/xhtml"dir= = ="zh-CN""rtl"xml:lang>
Description:
- Dir attribute is the international one.
- Dir attribute definition of the text in the browser in the direction of order.
- If the definition of the entire HTML documents should be arranged in the direction of html tags dir attribute in the definition of other HTML tags can also be defined dir attribute.
- Ltr dir is the common values, some languages (such as Arabic), is read from right to left, it should take rtl.
Extended reading
- HTML lang attribute
- XHTML xml: lang attribute
- HTML bdo labels
- Bi-directional attribute set Bi-directional Text Collection
