The direction CSS property specifies the text direction/writing direction. The rtl is used for Hebrew or Arabic text, the ltr is for other languages.
Overview tableltr
direction
direction: ltr
direction: rtl
The following example demonstrates how to set and retrieve the value of the direction property.
<p>This is a paragraph using default writting direction(ltr).</p>
<p class="rtl">This is a paragraph using right-to-left direction.</p>
<p class="rtl" id="bidi">The paragraph using rtl and sets the bidi-override as value of unicode-bidi property.</p>
p {
width: 300px;
background-color: #cccccc;
}
.rtl {
direction: rtl;
}
#bidi {
unicode-bidi: bidi-override;
}
Notes
The property does not affect alphanumeric characters in Latin documents. These characters always render ltr. However, the property does affect punctuation characters in Latin documents. The property pertains only to the directional flow of an element’s content. It has no effect on properties such as left or right, margin-left or margin-right. The margin-left property, for example, sets or retrieves the width of the margin on the left side of the document regardless of the value of the direction property.
Related specificationsReference
Conceptual
HTML Character Sets
Microsoft Developer Network: [Windows Internet Explorer API reference Article]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4