English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS Reference Manual

CSS @rules

Complete List of CSS Properties

CSS unicode-Usage and examples of bidi property

unicode-the bidi property is used together with the direction property to set or return whether the text is overridden, so that multiple languages can be supported in the same document.

unicode-bidi CSS property andDirectionthe property is related to the handling of bidirectional text in the document. For example, if a text block contains text from left to right and from right to left, the user agent will applyUnicode standarda complex algorithm defined by the Unicode standard to determine the correct text direction.

 Directionand unicode-The bidi property allows developers to control the embedding level and override of the algorithm.

The table below provides usage instructions and version history for this property, as well as the syntax for using this property in JavaScript scripts.

Default Value:normal
Applies To:All Elements
Inheritance:None
Animatable:No.See Animation Properties.
Version:CSS 2,3
JavaScript Syntax:object.style.unicodeBidi="bidi-override" 

Note:In most cases, this attribute can only be set byDTDDesigners use. Especially, authors, web designers, and users should not override it.

unicode-bidi syntax usage

The syntax of this attribute is as follows:

direction: bidi-override | embed | normal | initial | inherit

The following example demonstrates how to use the direction attribute.

  p {                        
   unicode-bidi: bidi-override;
   direction: rtl;
  }
Test see‹/›

Attribute Value

The following table describes the value of this attribute.

ValueDescription
bidi-override

For inline elements, this will create a replacement. For block container elements, this will create replacements for inline-level descendants that are not within another block container element.

This means that within the element, it is strictly followed byDirectionAttribute for reordering; the implicit part of the bidirectional algorithm will be ignored.

embedIf the element is inline, this value opens an additional embedding level relative to the bidirectional algorithm. The direction of this embedding level is determined byDirectionAttribute specification.
normalFor bidirectional algorithms, this value does not provide additional embedding levels. For inline elements, implicit reordering can cross element boundaries.
initialSet this attribute to its default value.
inheritIf specified, the associated elements adopt the unicode of their parent element.-bidi attribute values.

Browser Compatibility

unicode-Browser compatibility of bidi attributes, the numbers in the following table represent the minimum version number of browsers that support this attribute; all mainstream browsers support this attribute.

  • Firefox 1+

  • Google Chrome2+

  • Internet Explorer 5.5Above

  • Apple Safari 1.3+

  • Opera 9.2+

For further reading

Please refer to the following tutorials:CSS Text.

Related Properties:Direction.