-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbdi.html
More file actions
118 lines (105 loc) · 5.09 KB
/
Copy pathbdi.html
File metadata and controls
118 lines (105 loc) · 5.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tag <bdi></title>
<link rel="stylesheet" href="utils/css/global.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<nav>
<div class="logo">Tags HTML</div>
<ul class="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="referencias.html">Referências</a></li>
<li><a href="sobre.html">Sobre Nós</a></li>
</ul>
</nav>
</header>
<main>
<article class="main-content">
<section class="title-section-tag">
<h1>Tag HTML <bdi></h1>
</section>
<section class="content">
<section class="example-section">
<h3>Exemplo</h3>
<p>A tag <bdi> isola uma parte do texto para garantir a direção correta quando misturada com outros idiomas que possuem direção diferente (como árabe e hebraico).</p>
<div class="code-block">
<p>Usuário 1: <bdi>محمد</bdi></p><br>
<p>Usuário 2: <bdi>Ana</bdi></p><br>
<p>Pontuação: 80</p>
</div>
</section>
<section class="example-section">
<h3>Definição e uso</h3>
<p class="description">A tag <bdi> (Bi-Directional Isolation) é usada para isolar uma parte do texto que pode ter direção diferente do restante, garantindo que a exibição ocorra corretamente em idiomas RTL (da direita para a esquerda).</p>
<p>Isso é especialmente útil em interfaces multilíngues, onde nomes de usuários ou trechos de texto podem ter direções distintas.</p>
</section>
<section class="example-section">
<h3>Atributos</h3>
<table class="attributes-table">
<thead>
<tr>
<th>Atributo</th>
<th>Valor</th>
<th>Descrição</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>dir</strong></td>
<td>ltr | rtl | auto</td>
<td class="description">Define a direção do texto dentro do elemento <bdi>.</td>
</tr>
</tbody>
</table>
</section>
<section class="example-section">
<h3>Outros exemplos</h3>
<p>O exemplo abaixo mostra como o <bdi> evita confusões quando há mistura de idiomas com direções diferentes:</p>
<div class="code-block">
<ul><br>
<li>Usuário: <bdi>علي</bdi> - Pontuação: 90</li><br>
<li>Usuário: <bdi>João</bdi> - Pontuação: 80</li><br>
</ul>
</div>
</section>
</section>
</article>
<aside class="sidebar">
<h2>Outras Tags HTML</h2>
<input type="text" id="searchInput" placeholder="Pesquisar tag..." class="btn search-box">
<ul class="sidebar-links" id="tagList">
<li><a href="bdi.html"><bdi></a></li>
<li><a href="dialog.html"><dialog></a></li>
<li><a href="iframe.html"><iframe></a></li>
<li><a href="ol.html"><ol></a></li>
<li><a href="select.html"><select></a></li>
<li><a href="time.html"><time></a></li>
</ul>
</aside>
</main>
<footer>
<p>Copyright © 2025 Tutorial HTML5</p>
<p><a href="index.html">Home</a> | <a href="sobre.html">Sobre Nós</a> | <a href="referencias.html">Referências</a></p>
</footer>
</body>
</html>
<script>
const searchInput = document.getElementById('searchInput');
const tagList = document.getElementById('tagList');
const items = tagList.getElementsByTagName('li');
searchInput.addEventListener('keyup', function () {
const filter = this.value.toLowerCase();
for (let i = 0; i < items.length; i++) {
const link = items[i].getElementsByTagName('a')[0];
const text = link.textContent.toLowerCase();
items[i].style.display = text.includes(filter) ? '' : 'none';
}
});
</script>