The unicode-bidi property specifies the behavior of the bidirectional text in a document.
The unicode-bidi property allows to override the Unicode algorithm and control the text embedding. The unicode-bidi property should not be overridden by users, authors, and web designers. It should commonly be used by DTD designers.
The unicode-bidi and the direction properties are the only properties that are not affected by all property.
| Initial Value | normal |
| Applies to | All elements, though some values have no effect on non-inline elements. |
| Inherited | Yes. |
| Animatable | No. |
| Version | CSS2 |
| DOM Syntax | object.style.unicodeBidi = “isolate”; |
Syntax
unicode-bidi: normal | embed | bidi-override | isolate | isolate-override | plaintext | initial | inherit;
Example of the unicode-bidi property:
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
div.text {
direction: rtl;
unicode-bidi: embed;
}
</style>
</head>
<body>
<h2>Unicode-bidi property example</h2>
<div>Normal writing direction.</div>
<div class="text">Using "embed" value.</div>
</body>
</html>
Example of the unicode-bidi property with the “bidi-override” value:
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style>
div.text {
direction: rtl;
unicode-bidi: bidi-override;
}
</style>
</head>
<body>
<h2>Unicode-bidi property example</h2>
<div>Normal writing direction.</div>
<div class="text">Using "bidi-override" value.</div>
</body>
</html>