Esta tradução está incompleta. Por favor, ajude a traduzir este artigo.
Resumo
O HTML <div> elemento (ou simplesmente HTML Documento de Divisão de Elemento) é 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 class ou id), ou porque eles compartilham valores de atributos, como lang. Ele deve ser utilizado somente quando não tiver outro elemento de semântica (tal como <article> ou <nav>) como é apropriado.
- Content categories Flow content, palpable content.
- Permitted content Flow content.
- Tag omission None, both the starting and ending tag are mandatory.
- Permitted parent elements Any element that accepts flow content.
- DOM interface
HTMLDivElement
Atributos
Esse elemento inclui global attributes.
Na HTML5, o atributo align no <div> é .
Exemplos
<div> <p>Any kind of content here. Such as <p>, <table>. You name it!</p> </div>
Result
Qualquer tipo de conteúdo aqui. Assim como <p>, <table>. Você dá o nome!
Especificações
| Specification | Status | Comment |
|---|---|---|
| HTML Living Standard The definition of '<div>' in that specification. |
Padrão em tempo real | |
| HTML5 The definition of '<div>' in that specification. |
Recomendação | |
| HTML 4.01 Specification The definition of '<div>' in that specification. |
Recomendação |
Compatibilidade dos navegadores
We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | 1.0 | (Yes) | (Yes) | (Yes) | (Yes) |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |