CSS Property unicode-bidi








The unicode-bidi property handles the rendering of bi-directional text in HTML.

The unicode-bidi property is used together with the direction property to create embedded text with different text directions (right-to-left and left-to-right) in one element.

Summary

Initial value
normal
Inherited
yes
CSS Version
CSS2
JavaScript syntax
object.style.unicodeBidi="bidi-override"
Animatable
no

CSS Syntax

unicode-bidi: normal|embed|bidi-override;

Property Values

normal
offers no additional levels of embedded bi-directional text. This is the the default browser behavior. An element with this property will only contain LTR or RTL text.
embed
Creates an additional level of embedding. For example, RTL text flowing amidst LTR text.
bidi-override
Creates an additional level of embedding. Reordering depends on the direction property. Acts the same as embed when applied to inline elements. For block-level elements, it overrides the browser's bi-directional text algorithm and flows the text inside any inline children direction property.

Browser compatibility

unicode-bidi Yes Yes Yes Yes Yes




Example

<!DOCTYPE html>
<html>
<head>
<style>
div.ex1 {<!-- www . j a v  a2s.com-->
    direction: rtl;
    unicode-bidi: bidi-override;
}
</style>
</head>
<body>

<div>Some text.</div>
<div class="ex1">Some text. </div>

</body>
</html>

Click to view the demo