To tłumaczenie jest niekompletne. Pomóż przetłumaczyć ten artykuł z języka angielskiego.

Element <body> reprezentuje treść dokumentu HTML. W dokumencie może być tylko jeden element <body>.

Kategorie zawartości Sectioning root.
Dozwolona zawartość Flow content.
Pominięcie tagu

Tag otwierający może zostać pominięty w przypadku gdy pierwsza rzecz znajdującam się wewnątrz elementu nie jest:

Tag zamykający może zostać pominięty jeżeli element posiada zawartość lub tag otwierający i nie jest rozpoczęty od komentarza. 

Możliwi rodzice Element ten musi być drugim dzieckiem tagu <html>.
Możliwe ARIA  roles Brak
DOM interface HTMLBodyElement

Attributes

This element includes the global attributes.

alink
Color of text for hyperlinks when selected. This method is non-conforming, use CSS color property in conjunction with the :active pseudo-class instead.
background
URI of a image to use as a background. This method is non-conforming, use CSS background property on the element instead.
bgcolor
Background color for the document. This method is non-conforming, use CSS background-color property on the element instead.
bottommargin
The margin of the bottom of the body. This method is non-conforming, use CSS margin-bottom property on the element instead.
leftmargin
The margin of the left of the body. This method is non-conforming, use CSS margin-left property on the element instead.
link
Color of text for unvisited hypertext links. This method is non-conforming, use CSS color property in conjunction with the :link pseudo-class instead.
onafterprint
Function to call after the user has printed the document.
onbeforeprint
Function to call when the user requests printing of the document.
onbeforeunload
Function to call when the document is about to be unloaded.
onblur
Function to call when the document loses focus.
onerror
Function to call when the document fails to load properly.
onfocus
Function to call when the document receives focus.
onhashchange
Function to call when the fragment identifier part (starting with the hash ('#') character) of the document's current address has changed.
onlanguagechange
Function to call when the preferred languages changed.
onload
Function to call when the document has finished loading.
onmessage
Function to call when the document has received a message.
onoffline
Function to call when network communication has failed.
ononline
Function to call when network communication has been restored.
onpopstate
Function to call when the user has navigated session history.
onredo
Function to call when the user has moved forward in undo transaction history.
onresize
Function to call when the document has been resized.
onstorage
Function to call when the storage area has changed.
onundo
Function to call when the user has moved backward in undo transaction history.
onunload
Function to call when the document is going away.
rightmargin
The margin of the right of the body. This method is non-conforming, use CSS margin-right property on the element instead.
text
Foreground color of text. This method is non-conforming, use CSS color property on the element instead.
topmargin
The margin of the top of the body. This method is non-conforming, use CSS margin-top property on the element instead.
vlink
Color of text for visited hypertext links. This method is non-conforming, use CSS color property in conjunction with the :visited pseudo-class instead.

Example

<html>
  <head>
    <title>Document title</title>
  </head>
  <body>
    <p>This is a paragraph</p>
  </body>
</html>

Specifications

Specification Status Comment
HTML Living Standard
The definition of '<body>' in that specification.
Living Standard Changed the list of non-conforming features.
HTML5
The definition of '<body>' in that specification.
Recommendation Obsoleted the formerly deprecated attributes. Defined the behavior of the non-conforming and never standardized margintop, marginleft, marginright and marginbottom. Added the on* attributes.
HTML 4.01 Specification
The definition of '<body>' in that specification.
Recommendation Deprecated the alink, background, bgcolor, link, text and vlink attributes.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
alink
Deprecated
Chrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
background
Deprecated
Chrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
bgcolor
Deprecated
Chrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
bottommargin
Deprecated
Chrome Full support YesEdge No support NoFirefox Full support 35
Notes
Full support 35
Notes
Notes Before Firefox 35, it was supported in Quirks Mode only.
IE No support NoOpera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile No support NoFirefox Android Full support 35
Notes
Full support 35
Notes
Notes Before Firefox 35, it was supported in Quirks Mode only.
Opera Android Full support YesSafari iOS ? Samsung Internet Android Full support Yes
leftmargin
Deprecated
Chrome Full support YesEdge No support NoFirefox Full support 35
Notes
Full support 35
Notes
Notes Before Firefox 35, it was supported in Quirks Mode only.
IE No support NoOpera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile No support NoFirefox Android Full support 35
Notes
Full support 35
Notes
Notes Before Firefox 35, it was supported in Quirks Mode only.
Opera Android Full support YesSafari iOS ? Samsung Internet Android Full support Yes
link
Deprecated
Chrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onafterprintChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onbeforeprintChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onbeforeunloadChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onblurChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onerrorChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onfocusChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onhashchangeChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onlanguagechange
Experimental
Chrome ? Edge No support NoFirefox Full support 32IE No support NoOpera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile No support NoFirefox Android Full support 32Opera Android ? Safari iOS ? Samsung Internet Android ?
onloadChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onmessageChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onofflineChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
ononlineChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onpopstateChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onredoChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onresizeChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onstorageChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onundoChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onunloadChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
rightmargin
Deprecated
Chrome Full support YesEdge No support NoFirefox Full support 35
Notes
Full support 35
Notes
Notes Before Firefox 35, it was supported in Quirks Mode only.
IE No support NoOpera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile No support NoFirefox Android Full support 35
Notes
Full support 35
Notes
Notes Before Firefox 35, it was supported in Quirks Mode only.
Opera Android Full support YesSafari iOS ? Samsung Internet Android Full support Yes
text
Deprecated
Chrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
topmargin
Deprecated
Chrome Full support YesEdge No support NoFirefox Full support 35
Notes
Full support 35
Notes
Notes Before Firefox 35, it was supported in Quirks Mode only.
IE No support NoOpera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile No support NoFirefox Android Full support 35
Notes
Full support 35
Notes
Notes Before Firefox 35, it was supported in Quirks Mode only.
Opera Android Full support YesSafari iOS ? Samsung Internet Android Full support Yes
vlink
Deprecated
Chrome Full support 1Edge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.
See implementation notes.
See implementation notes.

See also

Autorzy i etykiety dokumentu

Autorzy tej strony: TheViolence
Ostatnia aktualizacja: TheViolence,