HTML - <bdo>

The HTML <bdo> Element (or HTML bidirectional override element) is used to override the current directionality of text. It causes the directionality of the characters to be ignored in favor of the specified directionality.

Examples

Example1

HTML
<!-- Switch text direction -->
<p>This text will go left to right.</p>
<p><bdo dir="rtl">This text will go right to left.</bdo></p>

Result

This text will go left to right.

.tfel ot thgir og lliw txet sihT

Description  

Content categories Flow content, phrasing content, palpable content.
Permitted content Phrasing content.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parent elements Any element that accepts phrasing content.
DOM interface HTMLElement Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element.

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes) (Yes) (Yes) (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support (Yes) ? ? ? (Yes)

Notes  

The HTML 4 specification did not specify events for this element; they were added in XHTML. This is most likely an oversight.

Specifications  

Specification Status Comment
WHATWG HTML Living Standard
The definition of '<bdo>' in that specification.
Living Standard  
HTML5
The definition of '<bdo>' in that specification.
Recommendation  
HTML 4.01 Specification
The definition of '<bdo>' in that specification.
Recommendation  

 

The HTML <bdo> Element (or HTML bidirectional override element) is used to override the current directionality of text. It causes the directionality of the characters to be ignored in favor of the specified directionality.

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/element/bdo

BiDi Element HTML HTML text-level semantics NeedsCompatTable Reference Web