The HTML5 bdo Tag
The HTML5 <bdo> tag is a formatting element which is used to override the current text direction. It is used to adjust the text direction from either l-t-r (left to right) or r-t-l (right to left). It is almost similar in function with the HTML5 <bdi> tag. The HTML5 <bdo> tag has attributes which can be altered to reach the desired effect of the tag.
The HTML5 <bdo> tag is used this way: <bdo dir="ltr">This line will go left-to-right.</bdo>
The attributes that can be used for the HTML5 <base> tag are the following:
Attribute |
Value |
Description |
dir |
ltr |
Required. Specifies the text direction of the text inside the <bdo> element |
The HTML5 <bdo> tag is also compatible with the functions of both the Global Attributes and Event Attributes in HTML5. The HTML5 <bdo> tag is useful when displaying text written in Hebrew, Arabic, and other languages/scripts that are written from right to left.