bdo – forced text direction
<bdo dir="rtl">…</bdo>
Forces the text direction given by the dir attribute and turns off the automatic detection of direction from the characters. With dir="rtl" even Latin text is displayed backwards. In practice it is rarely used – for demonstrations, to fix wrongly ordered text or to show data in its original order.
- Default display:
display: inline - End tag: required
- Content: phrasing content
- Where it can be used: anywhere phrasing content is allowed
- DOM interface:
HTMLElement
Attributes
- dir (required) –
ltr(left to right) orrtl(right to left).
Examples
Text written backwards:
<p>Reversed: <bdo dir="rtl">Mill Lane Bakery</bdo></p>
Things to watch out for
- You do not need
bdofor Arabic or Hebrew text – the browser recognizes its direction itself.bdiisolates text of unknown direction. - Without the
dirattributebdomakes no sense.
Browser support
Baseline – widely available: works in all major browsers and has for a long time (since 2015 at the latest). Since version: Chrome 15, Firefox 10, Safari 4. As of October 2026 (MDN browser-compat-data).
Related:
bdi – isolated text direction
dir – text direction (attribute)