--- title:
slug: Web/HTML/Element/body tags: - Elemento raiz - Elemetos - HTML - Referências - Seções - Web translation_of: Web/HTML/Element/body ---{{HTMLRef}}
O elemento <body> do HTML representa o conteúdo de um documento HTML. è permitido apenas um <body> por documento.
| Categorias | Seção raiz. |
|---|---|
| Conteúdo permitido | Conteúdo de fluxo. |
| Omissão de tag |
A tag inicial pode ser omitida se a primeira coisa dentro do elemento não for um espaço, comentário, elemento {{HTMLElement("script")}} ou elemento {{HTMLElement("style")}}. A tag final pode ser omitida se o elemento body possuir conteúdo ou tem uma tag inicial e não é imediatamente seguida por um comentário. |
| Elementos pais permitidos | Deve ser o segundo elemento de um elemento {{HTMLElement("html")}}. |
| DOM interface | {{domxref("HTMLBodyElement")}}
|
Estes elementos incluem os atributos globais.
'#') character) of the document's current address has changed.| Especificação | Status | Comentário |
|---|---|---|
| {{SpecName('HTML WHATWG', 'sections.html#the-body-element', '<body>')}} | {{Spec2('HTML WHATWG')}} | Changed the list of non-conforming features. |
| {{SpecName('HTML5 W3C', 'sections.html#the-body-element', '<body>')}} | {{Spec2('HTML5 W3C')}} | Obsoleted the formerly deprecated attributes. Defined the behavior of the non-conforming and never standardized margintop, marginleft, marginright and marginbottom. Added the on* attributes. |
| {{SpecName('HTML4.01', 'struct/global.html#h-7.5.1', '<body>')}} | {{Spec2('HTML4.01')}} | Deprecated the alink, background, bgcolor, link, text and vlink attributes. |
{{CompatibilityTable}}
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | 1.0 | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
onlanguagechange |
{{CompatUnknown}} | {{CompatGeckoDesktop("32")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
bottommargin, leftmargin, rightmargin, topmargin {{obsolete_inline}} |
{{CompatVersionUnknown}} | {{CompatGeckoDesktop("35")}} [1] | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} | {{CompatVersionUnknown}} |
onlanguagechange |
{{CompatUnknown}} | {{CompatGeckoMobile("32")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
bottommargin, leftmargin, rightmargin, topmargin {{obsolete_inline}} |
{{CompatVersionUnknown}} | {{CompatGeckoMobile("35")}} [1] | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
[1] Was supported before this in Quirk Mode only.