Bdo Tag in HTML5


In this article, I describe the implementation and use of the Bi-Directional Override (bdo) tag in HTML5.

Bdo Tag

The <bdo> tag defines the current text direction. It overrides the Unicode bidirectional algorithm by explicitly specifying a direction override. This tag in HTML5 is very much similar to the <bdo> tag in HTML4.01.
Attributes used in <bdo> tag
  1. dir: It specifies the direction of the text inside the <bdo> tag.
<bdo dir="value">
where value="rtl" (It is used to specify the right to left text direction.)
          value="ltr" (It is used to specify left to right text direction.)
Browser Support
The <bdo> tag is supported by all major browsers.
Coding of <bdo> tag in HTML5
  1. <!DOCTYPE html>  
  2. <html>  
  3.    <head>  
  4.       <title>  
  5.       Bdo Tag in HTML5  
  6.       <title>  
  7.    </head>  
  8.    <body>  
  9.       <h1 style="color:Blue">Implementation of <bdo> tag in HTML5</h1>  
  10.       <p>This article is used to describe <bdo> tag in HTML5.</p>  
  11.       <p><bdo dir="rtl">This article is used to describe <bdo> tag in HTML5.</bdo></p>  
  12.       <p><bdo dir="ltr">This article is used to describe <bdo> tag in HTML5.</bdo></p>  
  13.    </body>  
  14. </html>