- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML Tag
The bdo tag in HTML is used to set the direction of text. The term bdo is the short-form for Bi-Directional Override. Following is the attribute−
- dir: Set the text direction. The value can be ltr or rtl for left-to-right or right-to-left directions respectively.
Let us now see an example to implement the bdo tag in HTML−
Example
<!DOCTYPE html> <html> <body> <h2>Demo Heading</h2> <p>This is a demo text!</p> <p><bdo dir="rtl">This is another demo text.</bdo></p> </body> </html>
Output
In the above example, we have set a normal text first−
<p>This is a demo text!</p>
After that, we have set a text that has a direction from rtl i.e. right-to-left using the <bdo> element −
<p><bdo dir="rtl">This is another demo text.</bdo></p>
Advertisements