The Document.dir
property is a string representing the directionality of the text of the document, whether left to right (default) or right to left. Possible values are 'rtl'
, right to left, and 'ltr'
, left to right.
The Document.dir
property is a string representing the directionality of the text of the document, whether left to right (default) or right to left. Possible values are 'rtl'
, right to left, and 'ltr'
, left to right.
A string.
Specification |
---|
HTML Standard # dom-document-dir |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
dir |
64 | 12 | 1Incorrect behavior before Firefox 23. |
5 | 51 | 10.1 | 64 | 64 | 4Incorrect behavior before Firefox 23. |
47 | 10.3 | 9.0 |
dir
global attribute
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Document/dir