bdo (HTML element)
Example
Here’s an example in which the word “Canoe” is reversed:
<p>A palindrome is a word, like 'kayak,' that appears
exactly the same when all the letters are reversed.
<bdo dir="rtl">Canoe</bdo>, it seems, is not a
palindrome.</p>
- Type
- inline element
- Contains
- inline elements
- Contained by
- block-level elements, inline elements
Description
The
bdo element is used to reverse the direction of text
enclosed between the opening <bdo> and closing
</bdo> tags. It will often be used with the lang or xml:lang attributes, given that
a common application of this element is to indicate a change of language
from the rest of the document.
Use This For …
This element may be used to embed in a page some text that’s in a language that differs from the bulk of the document (for example, embedding a phrase in Hebrew inside a paragraph of English); it may also be used for purely aesthetic reasons.
Compatibility
| IE | 5.5 | Full |
|---|---|---|
| 6.0 | Full | |
| 7.0 | Full | |
| Firefox | 1.0 | Full |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | None |
| 2.0 | None | |
| 3.0 | Full | |
| Opera | 9.2 | Full |
| 9.5 | Full |
With the exception of Safari 1.3 and 2, all browsers reverse the text properly.
User-contributed notes
- ID:
- #1
- Date:
- Fri, 28 Mar 2008 10:22:37 GMT
'The bdo element is used to reverse the direction of text enclosed'
That is not entirely correct. The purpose of the BDO element type is to *override* the Unicode bi-directional algorithm.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

