{{HTMLRef}}
Summary
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.
Usage Context
Content categories | Flow content, phrasing content, palpable content. |
---|---|
Permitted content | Phrasing content. |
Tag omission | {{no_tag_omission}} |
Permitted parent elements | Any element that accepts phrasing content. |
DOM interface | {{domxref("HTMLElement")}} Up to Gecko 1.9.2 (Firefox 4) inclusive, Firefox implements the HTMLSpanElement interface for this element. |
Attributes
This element includes the global attributes.
- {{htmlattrdef("dir")}}
- Text direction in this element. Possible values are:
ltr
: Indicates that the text should go in a left-to-right direction.rtl
: Indicates that the text should go in a right-to-left direction.
Examples
<!-- 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
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 |
---|---|---|
{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-bdo-element', '<bdo>')}} | {{Spec2('HTML WHATWG')}} | |
{{SpecName('HTML5 W3C', 'the-bdo-element.html#the-bdo-element', '<bdo>')}} | {{Spec2('HTML5 W3C')}} | |
{{SpecName('HTML4.01', 'dirlang.html#h-8.2.4', '<bdo>')}} | {{Spec2('HTML4.01')}} |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatVersionUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatVersionUnknown}} |