Body

This HTML element is meant to represent the content of a document.

There can only be one body element in a document.

Attributes

  • the global attributes
  • onafterprint
    • called after the user prints the document
  • onbeforeprint
    • called when the user requests printing of the document
  • onbeforeunload
    • called when the document is about to be unloaded
  • onblur
    • called when the document loses focus
  • onerror
    • called when the document fails to load properly
  • onfocus
    • called when the document gets focused
  • onhashchange
    • called when the document's hash changes
  • onlanguagechange
    • called when the document preferred language changes
  • onload
    • called when the document has finished loading
  • onmessage
    • called when the document receives a message
  • onoffline
    • called when network communications fail
  • ononline
    • called when network communications return
  • onpopstate
    • called when the user navigates session history
  • onredo
    • called when the user moves forward in undo transaction history
  • onresize
    • called when the document changes size
  • onstorage
    • called when the storage area changes
  • onundo
    • called when the user moves backward in undo transaction history
  • onunload
    • called when the document is going away