bdo (HTML element)
| Depr. | Empty | Version |
|---|---|---|
| No | No | HTML 4 |
| IE5.5+ | FF1+ | SA3.1+ | OP9.2+ | CH2+ |
|---|---|---|---|---|
| Full | Full | Full | Full | Full |
Syntax
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.
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>
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
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 3.0 | 3.5 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| Full | Full | Full | Full | Full | Full | Full | Full | Full | None | None | Full | Full | Full | Full | Full | Full |
With the exception of Safari 1.3 and 2, all browsers reverse the text properly.
In this Section
dir
specifies the direction of text inside thebdoelement
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.