HTML <bdo>
Tag
Topic: HTML5 Tags ReferencePrev|Next
Description
The <bdo>
(short for bidirectional override) tag is used to override the current text direction.
You must specify the dir
attribute on this element. This mandatory attribute specifies the base direction of the element's text content, which overrides the inherent directionality of characters as defined in [UNICODE].
The following table summarizes the usages context and the version history of this tag.
Placement: | Inline |
---|---|
Content: | Inline and text |
Start/End Tag: | Start tag: required, End tag: required |
Version: | HTML 4, 4.01, 5 |
Syntax
The basic syntax of the <bdo>
tag is given with:
The example below shows the <bdo>
tag in action.
Example
Try this code »<p>The sequence "1-2-3-4-5" was reversed as: <bdo dir="rtl">1-2-3-4-5</bdo></p>
Tag-Specific Attributes
The following table shows the attributes that are specific to the <bdo>
tag.
Attribute | Value | Description |
---|---|---|
dir |
ltr |
Override the current directionality of text inside the <bdo> element, with the value ltr to specify a left-to-right override and rtl to specify a right-to-left override. |
Global Attributes
Like all other HTML tags, the <bdo>
tag supports the global attributes in HTML5.
Event Attributes
The <bdo>
tag also supports the event attributes in HTML5.
Browser Compatibility
The <bdo>
tag is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: HTML Text Formatting.