HTML bdo Tag

HTML bdo Tag is used to override the current text direction. BDO stands for Bi Directional override.

Syntax of HTML bdo Tag

The Syntax of HTML bdo Tag is shown below. It has both opening and closing tags.

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<bdo dir="rtl">
// text here
</bdo>
</body>
</html>

Usage of HTML bdo Tag

Using HTML bdo tag, you can override left to right direction of text to right to left and vice versa. It is mostly used where the direction of text written inside bdo tag is known. For dynamic text HTML bdi tag is used.

Example of HTML bdo Tag

Simple example of HTML bdo tag is shown below.

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<bdo dir="rtl">
This text will changes it's direction from right to left.
</bdo>
</body>
</html>

In the above example as you can see, the bdo tag is used to override the direction of text from left to right to right to left.

Output

The output of above example is shown below.

This text will changes it's direction from right to left.

dir Attribute and bdo Tag

dir attribute is used to override the text direction written inside the bdo tag. Defining the value of dir attribute is mandatory. The two possible values of dir attribute are rtl and ltr.

Browser Support for HTML bdo Tag

HTML bdo Tag is supported by all major browsers including safari and internet explorer.

Global Attributes Support in HTML bdo Tag

The HTML bdo Tag supports Global Attributes.

Event Attributes Support in HTML bdo Tag

The HTML bdo Tag supports Event Attributes.

HTML bdo Tag Video

Watch our video on HTML bdo Tag and subscribe our Youtube Channel.