aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/html/element/div/index.html
blob: 37180fef93924f8a848ea1fe70e2159f963ccc29 (plain)
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
119
120
121
---
title: <div>
slug: Web/HTML/Element/div
translation_of: Web/HTML/Element/div
---
<h2 id="Summary" name="Summary">Resumo</h2>

<p><strong>elemento de divisão</strong> <strong><a href="/en-US/docs/Web/HTML">HTML</a> <code>&lt;div&gt;</code> </strong>é um container genérico para conteúdo de fluxo, que de certa forma não representa nada. Ele pode ser utilizado para agrupar elementos para fins de estilos (usando <strong>class</strong> ou <strong>id</strong>), ou porque eles compartilham valores de atributos, como <strong>lang</strong>. Ele deve ser utilizado somente quando não tiver outro elemento de semântica (tal como {{HTMLElement("article")}} ou {{HTMLElement("nav")}}).</p>

<ul class="htmlelt">
 <li><dfn><a href="/en-US/docs/Web/HTML/Content_categories" title="HTML/Content_categories">Categoria de conteúdo</a></dfn> <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>, palpable content.</li>
 <li><dfn>Conteúdo permitido</dfn> <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>.</li>
 <li><dfn>Omissão de tag</dfn>Nenhuma, as tags de abertura e fechamento são obrigatórias. {{no_tag_omission}}</li>
 <li><dfn>Elementos pais permitidos</dfn>Qualquer elemento que aceite conteúdo de fluxo.</li>
 <li><dfn>Interface DOM</dfn> {{domxref("HTMLDivElement")}}</li>
</ul>

<h2 id="Attributes" name="Attributes">Atributos</h2>

<p>Esse elemento inclui <a href="/pt-BR/docs/Web/HTML/Global_attributes">atributos globais</a>.</p>

<p>No {{HTMLVersionInline(5)}}, o atributo <strong>align</strong> no <strong>&lt;div&gt;</strong> é  obsoleto {{obsolete_inline}}.</p>

<h2 id="Examples" name="Examples">Exemplos</h2>

<pre class="brush: html">&lt;div&gt;
  &lt;p&gt;Qualquer tipo de conteúdo aqui. Como &amp;lt;p&amp;gt;, &amp;lt;table&amp;gt;. Você dá o nome!&lt;/p&gt;
&lt;/div&gt;
</pre>

<h3 id="Result" name="Result">Resultado</h3>

<p>Qualquer tipo de conteúdo aqui. Como &lt;p&gt;, &lt;table&gt;. Você dá o nome!</p>

<h2 id="Specifications" name="Specifications">Especificações</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Especificação</th>
   <th scope="col">Status</th>
   <th scope="col">Comentário</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'grouping-content.html#the-div-element', '&lt;div&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'grouping-content.html#the-div-element', '&lt;div&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('HTML4.01', 'struct/global.html#h-7.5.4', '&lt;div&gt;')}}</td>
   <td>{{Spec2('HTML4.01')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">Compatibilidade dos navegadores</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>1.0</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="See_also" name="See_also">Veja também</h2>

<ul>
 <li>Semantic sectioning elements: {{HTMLElement("section")}}, {{HTMLElement("article")}}, {{HTMLElement("nav")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}</li>
 <li>{{HTMLElement("span")}} element for styling of phrasing content</li>
</ul>

<div>{{HTMLRef}}</div>