HTML bdo tag | HTML bdo dir

What is html bdo tag? bdo tag definition

Bdo stands for Bi-Directional Override in html language. Html bdo tag is supported in all major browsers like Firefox, Safari, Internet Explorer (IE), Opera and Google Chrome.

Usage of HTML <bdo> tag

The html bdo tag is used to override the text direction in an html document. It is used when you want to change the direction of the text. For example writing a text in Arabic can be done using the <bdo> tag. To describe more see the example below.

HTML Code Example

<!DOCTYPE html>

<html lang='en'>


<meta charset="UTF-8" />


HTML Text <bdo> tag





HTML Text <bdo> tag



Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis quis

porta nunc. Aliquam quis nulla turpis. <bdo dir="rtl">Nam tincidunt nunc hendrerit

ligula aliquet vel feugiat diam pharetra.</bdo>




In the above code we are trying to get to write text from right to left. We have used the <bdo> tag with its “dir” attribute. This attribute has two values “rtl” and “ltr”. We have put the desired text in between the <bdo> tags. You can see the text will be written from right to left in the output.


Remember if you want to use the “dir” attribute on any tag else than <bdo> tag it will not work properly. So the best way to use the “dir” attribute to change the direction of text, is in the <bdo> tag.

Related Posts