HTML <bdi> tag

HTML <bdi> tag : Definition

• The HTML <bdi> (stands for bi-directional isolation) element, it is used to isolate a part of text that might be formatted in a different direction from other text outside it.

• The <bdi> element is used to wrap a span of text and instructs the bidirectional algorithm to treat this text in isolation from its surroundings. This works in two ways:

  • The directionality of text embedded in <bdi> does not influence the directionality of the surrounding text.
  • The directionality of text embedded in <bdi> is not influenced by the directionality of the surrounding text.

<bdi> tag example :


 <ul>
  <li>User <bdi>hrefs</bdi>: 60 points</li>
  <li>User <bdi>Miky</bdi>: 80 points</li>
  <li>User <bdi>إيان</bdi>: 90 points</li>
</ul> 






OUTPUT :

 
  • User hrefs: 60 points
  • User Miky: 80 points
  • User إيان: 90 points