Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

dir property

Sets or retrieves a value that indicates the reading order of the object.



p = object.dir


Property values

Type: String


Default. Content flows from left to right.


Content flows from right to left.


Unless explicitly set, the dir property has no return value when accessed in script.

The dir property does not affect alphanumeric characters in Latin documents. These characters always render ltr. However, the property does affect punctuation characters in Latin documents. For example, punctuation marks such as periods and question marks will render to the left of a sentence when the dir property is set to rtl.

The value of dir property has no effect on the orientation of coordinates for an object's positioning properties. For example, the left property and the right property perform the same placement in both cases. However, when both the left and right properties are specified, the left property takes precedence when the dir property is set to ltr. Likewise, the right property takes precedence when the dir property is set to rtl.

See also

HTML Character Sets



© 2016 Microsoft