HTML <bdi> tag stands for Bidirectional Isolate Element. It is used to inform the browser to isolate the span of text which may be formatted in opposite directions than the surrounding text.
This tag is new in HTML5 and useful for languages such as Arabic or Hebrew, or if the browser dynamically inserts some text without knowing the directionality of text.
Note: The directionality of content inside <bdi> does not influence by the directionality of surrounding content.
Syntax
<bdi>Content</bdi>
Following are some specifications about the <bdi> tag
Display | Inline |
Start tag/End tag | Both start and End tag |
Usage | Semantic/textual |
Example
<!DOCTYPE html>
<html>
<head>
<title>Bdi tag</title>
<style>
bdi{
font-size: 25px;
color: red; }
</style>
</head>
<body>
<h2>Example of HTML bdi tag</h2>
<p>
This <bdi> ???? ????? </bdi> Content is written in Arabic language
</p>
</body>
</html>
Leave a Reply