Skip to content

<bdo> - The Bidirectional Text Override Element

Inline HTML 4.0

The bidirectional text override element explicitly overrides the current text direction, forcing text to render in a specified direction (left-to-right or right-to-left).

Result
<bdo dir="ltr">text</bdo>
<bdo dir="rtl">text</bdo>

The dir attribute is required and must be either ltr (left-to-right) or rtl (right-to-left).

AttributeDescriptionValues
dirText directionltr (left-to-right), rtl (right-to-left)
Result
Result
Result
Result
Result
Result
<!-- Explicit direction override -->
<p>Display <bdo dir="rtl">this text</bdo> right-to-left</p>

Use when you know the direction and want to force it.

<!-- Override specific span of text -->
<p>English <bdo dir="rtl">RTL text</bdo> English</p>

Affects only the wrapped content.

Result
Result

Screen readers respect the dir attribute and will read the text in the specified direction.

Always combine <bdo> with the lang attribute for proper accessibility:

<p>Arabic: <bdo dir="rtl" lang="ar">مرحبا</bdo></p>
<p>Hebrew: <bdo dir="rtl" lang="he">שלום</bdo></p>

Only use <bdo> when you need to override the default direction. For most RTL content, the dir attribute on the container is sufficient:

<p><bdo dir="rtl">كل هذا النص بالعربية</bdo></p>
BrowserVersionNotes
Chrome1+Full support
Firefox1+Full support
Safari1+Full support
Edge12+Full support
IE5+Full support

The <bdo> element has excellent browser support across all modern and legacy browsers.

dir attribute

Global attribute to set text direction. Learn more →