Computer >> Computer tutorials >  >> Programming >> Javascript

How to represent text that must be isolated from its surrounding for bidirectional text formatting in HTML?


Use embed text with a different direction from another text, with the <bdi> tag, to represent isolated text.

Example

You can try to run the following code to represent text to be isolated from its surrounding for bidirectional text formatting −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML bdi Tag</title>
   </head>
   <body>
      <p>Quizzes:</p>

      <ul>
         <li>Programming: <bdi>Java</bdi></li>
         <li>Scripting: <bdi>JavaScript</bdi></li>
         <li>Mobile: <bdi>Android</bdi></li>
      </ul>
   </body>
</html>