Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

How to isolate a part of text that may be formatted in a different direction using HTML5 ?

  • Last Updated : 14 Apr, 2021

The Task is to learn how to isolate a part of the text that may be formatted in a different direction using HTML5?

Approach: As we know that bdi stands for Bi-Directional Isolation. Basically. It is used to differentiate a text from other text that may be formatted in a different direction. The Task can be done by using the <bdi> Tag in the Document.  

Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

Syntax:

<bdi> Contents... </bdi>

Example Code: The below example illustrate the bdi tag

HTML




<!DOCTYPE html>
<html>
  
<body>
    <!--This is heading Tag -->
    <h1>GeeksforGeeks</h1>
    <!--bdi Tag used in unordered list -->
    <ul>
        <h3>bdi Content</h3>
        <li>
            <bdi class="name">Himanshu Jha</bdi>: indian name
        </li>
        <li>
            <bdi class="name">الرجل القوي إيان</bdi>: arabic name
        </li>
        <li><bdi>Manas Chhabra</bdi>
        </li>
        <li><bdi>GeeksForGeeks</bdi></li>
    </ul>
</body>
  
</html>

Output 

Supported Browsers:  Google ChromeFirefoxOperaSafar

My Personal Notes arrow_drop_up
Recommended Articles
Page :