CSS unicode-bidi Property


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 Valuenormal
Applies toAll elements, though some values have no effect on non-inline elements.
InheritedYes.
AnimatableNo.
VersionCSS2
DOM Syntaxobject.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>

Leave a Reply

Your email address will not be published. Required fields are marked *