HTML & CSS Wiki
Advertisement

The unicode-bidi property is used in CSS and certain HTML elements. Along with direction, this property relates to the handling of bidirectional text within a given document. If a paragraph contains both left-to-right text and right-to-left text, the user agent applies a complex algorithm defined by the Unicode standard to determine how the text should appear. This property specifically controls the embedding levels and overrides for the Unicode bidirectional algorithm.

The CSS2.1 specification emphasizes that this property should normally be used only by DTD designers. In particular, authors, web designers, and users shouldn’t override it.


Values[]

Value Description
bidi-override This value creates an override for inline elements. For block-level elements, table cells, table captions, or inline blocks, it creates an override for (some) inline-level descendants. In other words, the implicit part of the bidirectional algorithm is ignored and the value of the direction property is used for reordering content within the element.
embed This value offers an additional level of embedding for inline elements. The direction of the embedding level is determined by the direction property.
normal This value doesn’t offer an additional level of embedding with respect to the bidirectional algorithm. For inline elements, implicit reordering works across element boundaries.


HTML example:

<body style="direction:rtl; unicode-bidi:embed;">
Body content.
</body>


CSS example:

h1 {
    direction:rtl;
    unicode-bidi:embed;
}

External Links[]

Advertisement