HTML Bdo Tag Dir Attribute

HTML Bdo Tag Dir AttributeHTML Bdo Tag Dir Attribute is used to give direction to the text within the HTML Bdo Tag.

HTML Bdo Tag (<bdo>) stands for bidirectional override.

The HTML Bdo Tag is used to overrule the existing direction of text in any HTML resource or webpage.


HTML Bdo Tag Dir Attribute Syntax

<bdo dir=”rtl|ltr”>
Some text here
</bdo>

HTML Bdo Tag Dir Attribute Example

HTML Bdo Tag Code Output
<p> This text is left to right </p>
<p><bdo dir="rtl"> This text is right to left </bdo>
This text is left to right This text is right to left

In the HTML BDo Tag example output, we can see that the text “This text is right to left” is actually rendered from right to left because we have wrapped the text in HTML Bdo Tag and have used the value of “dir” attribute as “rtl”.

Notice the use of “dir” attribute to orient the text from right to left.


HTML Bdo Tag Dir Attribute Values

HTML Bdo Tag Dir Attribute Value Meaning
rtl | ltr Rtl stands for right to left orientationLtr stands for left to right orientation

HTML Bdo Tag Dir Attribute Supporting Browsers

S. No. Browser Supported(Yes/No)
1 Internet Explorer Yes
2 Firefox Yes
3 Google Chrome Yes
4 Opera Yes
5 Safari Yes

Tagged , , , , , , , , , , , , , . Bookmark the permalink.