HTML bdi Tag

Last Updated : 27 Nov, 2024

The <bdi> tag in HTML stands for "Bi-Directional Isolation." It is used to isolate a part of text that might be formatted in a different direction than the surrounding text. This is particularly useful in multilingual applications where text in different languages may be displayed together, and you want to ensure that the text direction is preserved without being affected by surrounding text.

Note: This tag is new in HTML5.

Syntax

<bdi> Contents... </bdi>
html
<!DOCTYPE html>
<html>

<body>
    <ul>
        <li><bdi class="name">
                Himanshu Jha</bdi>: indian name
        </li>
        <li>
            <bdi class="name">الرجل القوي إيان</bdi>: arabic name
        </li>
    </ul>
</body>

</html>
Comment