HTML <bdo> Tag

The <bdo> tag means Bi Directional Override. We use this element to override current text direction.When we put this code, it makes character's direction to be ignored.

The <bdo> tag comes in pairs. The content must be written between opening ( <bdo> ) and closing ( </bdo>) tags.

The <bdo> tag is used with the dir attribute, which is specifies the direction of the text.

The dir attribute has a follow values:

  • ltr: The text should go in a left-to-right direction.
  • rtl: The text should go in a right-to-left direction.

Let's see an example:

<!DOCTYPE html>
    <p>As you see, this text is from left to right.</p>
      <bdo dir="rtl">But here it is from right to left</bdo>

Here the result is:


The <bdo> tag also use the Global Attributes

Attributes Values Description
dir ltr Specifies the text direction of the text inside the <bdo> element.