HTML <bdo> tag


HTML <bdo> tag stands for “bidirectional override” which is used to overrides the current/default text direction. This tag sets the direction of content within it to render on browser from left to right or right to left.

The <bdo> tag is useful for the languages which are written from right to left such as Arabic and Hebrew.

Syntax:

<bdo dir=" "> Content......</bdo>  

Following are some specifications about the <bdo> tag

DisplayInline
Start tag/End tagBoth start and End tag
Usagetextual

Example:

<!DOCTYPE html>  
<html>  
<head>  
    <title>Bdo tag</title>  
 </head>  
<body>  
     <h2>Example of HTML bdo tag</h2>  
     <p style="color:#ff4040">This is Normal Content with default directionality</p>  
     <p>This is with left to right directionality:  
         <bdo dir="ltr" style="color: #5f9ea0">A beautiful Flower</bdo>  
     </p>  
      <p>This is with right to left directionality:  
         <bdo dir="rtl" style="color:#68228b">A beautiful Flower</bdo>  
      </p>  
 </body>  
</html>  

Output:

HTML bdo tag

Attributes

Tag-specific attributes

AttributeValueDescription
dir
ltrDefines the directionality from left to right.
rtlDefines the directionality from right to left.

Global Attributes

The <bdo> tag supports the Global attribute in HTML.

Event Attributes

The <bdo> tag supports the Event attribute in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<bdo>YesYesYesYesYes

Leave a Reply

Your email address will not be published. Required fields are marked *