Skip to: content, navigation

by Ian Lloyd

bdo (HTML element)

Spec
Depr. Empty Version
No No HTML 4
Browser support full matrix
IE5.5+ FF1+ Saf3+ Op9.2+
Full Full Full Full
<bdo dir=" { ltr | rtl } ">
</bdo>

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

IE5.5Full
6.0Full
7.0Full
Firefox1.0Full
1.5Full
2.0Full
Safari1.3None
2.0None
3.0Full
Opera9.2Full
9.5Full

With the exception of Safari 1.3 and 2, all browsers reverse the text properly.

In this Section

User-contributed notes

ID:
#1
Date:
Fri, 28 Mar 2008 10:22:37 GMT
Contributed by:
AutisticCuckoo

'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.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters