Many languages (including Latin alphabet based languages)
are written and rendered horizontally from left to right,
while some others (such as Arabic and Hebrew) are written and
rendered from right to left. When characters from both writing
systems are present, it is known as bi-directional text (also
known as BIDI.) Some character combinations in BIDI situations
are ambiguous with respect to the directionality of the content.
If the ambiguity is not made clear, it can be impossible for a
computer to render these character combinations in such a way
that the original meaning is conveyed. HTML has allowed for the
resolution of this problem by creating the BDO element. This
element is used to force the directionality of each character
within to the value of its DIR attribute, irrespective of the
characters' intrinsic directional properties. The BDO DIR
attribute specifies whether the override is left-to-right or
right-to-left.
BIDI override is needed where absolute control over character
sequence order is required (such as mixed-language directionality
words) and use of the common attribute DIR on other elements
fails to produce proper bi-directional rendering. It is also useful
in dealing with short pieces of text in which the directionality
cannot be clearly resolved from the surrounding context.
Description:
On block-level elements, the DIR attribute indicates the base
directionality of the text in the block. If omitted it is inherited
from the parent element. The default directionality of the overall
HTML document is left-to-right. On inline elements, it makes the
element start a new directional embedding level. If omitted, the inline
element does not start a new embedding level.
Values: ltr - Left to Right rtl - Right to Left
Language
2 | 3
| 3.2 | 4
| IE
| M | N
Required? No
Description:
Specifies a string indicating the language/character set used in
in the BDO container.
Although the above example demonstrates the use of BDO by reversing
the direction of some English content (a rather cheap visual trick),
please remember that this is not its intended use. I used this example
to demonstrate the effect it would have on content if BDO was used.
BDO IS meant for resolving content display that has ambiguous
directionality clues.