Skip to content
Related Articles

Related Articles

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

Improve Article
Save Article
  • Last Updated : 14 Apr, 2021
Improve Article
Save Article

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.  

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
Related Articles

Start Your Coding Journey Now!