10 Jul HTML5 bdi tag
The full form of BDI is Bi-Directional Isolation. If you want to print a text that is different in direction (such as right-to-left) from the texts surrounding it, then use the HTML5 bdi tag. Here, you can consider an example of Arabic language, which is right-to-left.
Let’s say you want to include user-generated content, with directional, known only to the user. For that, use <bdi> tag,
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
<!DOCTYPE html> <html> <head> <title>Understanding HTML5 bdi tag</title> </head> <body> Favorite tourist destination selected by users, <ul> <li><bdi> المغربية </bdi>: It is a country in Africa.</li> </ul> </body> </html> |
Here’s the output showing the usage of HTML5 bdi tag,
No Comments