HTML5 <bdo> Tag

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

The only content permitted inside this element is Phrasing content. Both the starting and ending tag are required for this element. The parent of the <bdo> tag can be any element that accepts phrasing content.

The following style is applied to this element by default:

bdo {
  unicode-bidi: bidi-override;
}

Here is an example of using this tag:

<p>Don't ever take a fence down until you know why it was put up.</p>
<p><bdo dir="rtl">Don't ever take a fence down until you know why it was put up.</bdo></p>

Examples

See the Pen HTML bdo Tag by Tutorialio (@tutorialio) on CodePen.

Attributes

dir

This attribute determines the text direction of the element. It has two possible values. The value ltr indicates that the text should go in a left-to-right direction and the value rtl indicates that the text should go in a right-to-left direction.

Further Reading

  1. Read more about the HTML <bdo> element on MDN.
  2. You can also read the HTML <bdo> tag reference on W3C.

Reader Comments

1. You can register or login to post a comment. Asking readers to register improves the quality of discussion.

2. As a registered user, you will also get to access features like choosing between a light and dark theme or anything else that we might implement in future.

Follow Us For Updates

FacebookTwitterGoogle+
Go To Top