The direction property specifies the text direction, and the unicode-bidi property specifies the unicode direction.
p {
direction: rtl;
unicode-bidi: bidi-override;
}
The direction property
Specifies the text direction.
| Property | Value | Explanation |
|---|---|---|
| direction | ltr | from left to right (default) |
| rtl | from right to left |
The unicode-bidi property
Specifies the unicode direction.
| Property | Value | Explanation |
|---|---|---|
| unicode-bidi | normal | normal direction (default) |
| embed | embedding the direction property's value | |
| bidi-override | the direction property's value overrides the unicode direction |
<html>
<head>
<title>TAG index</title>
<style type="text/css">
p { direction: rtl; }
.example1 { unicode-bidi: embed; }
.example2 { unicode-bidi: bidi-override; }
</style>
</head>
<body>
<p class="example1">The direction and unicode-bidi properties.</p>
<p class="example2">The direction and unicode-bidi properties.</p>
<p>The <span class="example1">direction and unicode-bidi</span> properties.</p>
<p>The <span class="example2">direction and unicode-bidi</span> properties.</p>
</body>
</html>
The direction and unicode-bidi properties.
The direction and unicode-bidi properties.
The direction and unicode-bidi properties.
The direction and unicode-bidi properties.