The <bdo> tag use to to override the text direction.It reffered to Bi- Directional Override.
This tag is useful when we want to display right- to-left written text (such as Hebrew, Arabic that are written from right to left) within left-to- right text (such as English) or vice versa.
YOu can understand how to use <bdo> tag by following example:-
e.g.
<!DOCTYPE html>
<html>
<body>
<p>This text will go left-to-right.</p>
<p><bdo dir="rtl">This text will go right-to- left.</bdo></p>
</body>
</html>
Result:-
<!DOCTYPE html>
<html>
<body>
<p>This text will go left-to-right.</p>
<p><bdo dir="rtl">This text will go right-to- left.</bdo></p>
</body>
</html>
Result:-
This text will go left-to-right.[because there is direction is in auto mode that is decided by browser according to language.]
This text will go right-to-left.
The following attributes can be set for the <bdo> tag:-
Attribute | Value | Discription |
---|---|---|
dir | ltr | override left-to-right direction |
rtl | override right-to-left-direction |
dir attribute is used to set the direction to ltr (left-to-right) or rtl (right-to-left).
values for dir tag:-
ltr: Indicates left-to-right direction.rtl: Indicates right-to-left direction.
auto: The browser decides which direction based on the element's content.
Conclusion:--
So the <bdo> tag is used to set the opposite direction within specified
text direction.Just like when you are writing arebic(that is written from
right to left) and you want to add english(that is written from leftt to
rightt) within arebic text you can use bdo tag as we explain above to write
english.
<bdo> tag का उपयोग परिभाषित टेक्स्ट डायरेक्शन(जो डायरेक्शन आप use कर रहे है ये right to left या left to right हो सकती है ) के टेक्स्ट के बीच में opposite डायरेक्शन के टेक्स्ट को लिखने के लिए किया जाता है जैसे की जब आप अरेबिक भाषा लिख रहे है जो की right से left दिशा में लिखी जाती है और इसके बीच में इंग्लिश टेक्स्ट लिखना चाहते है जो की left से right डायरेक्शन में लिखी जाती है तो आप <bdo> tag का use कर सकते है
<bdo> tag का उपयोग परिभाषित टेक्स्ट डायरेक्शन(जो डायरेक्शन आप use कर रहे है ये right to left या left to right हो सकती है ) के टेक्स्ट के बीच में opposite डायरेक्शन के टेक्स्ट को लिखने के लिए किया जाता है जैसे की जब आप अरेबिक भाषा लिख रहे है जो की right से left दिशा में लिखी जाती है और इसके बीच में इंग्लिश टेक्स्ट लिखना चाहते है जो की left से right डायरेक्शन में लिखी जाती है तो आप <bdo> tag का use कर सकते है
0 comments:
Post a Comment