18 lines
698 B
Plaintext
18 lines
698 B
Plaintext
The HTML <body> element represents the content of an HTML document. There is only one <body> element in a document.
|
||
|
||
Content categories:
|
||
Sectioning root.
|
||
|
||
Permitted content:
|
||
Flow content.
|
||
|
||
Tag omission:
|
||
The start tag may be omitted if the first thing inside it is not a space character, comment, <script> element or <style> element. The end tag may be omitted if the body element has contents or has a start tag, and is not immediately followed by a comment.
|
||
|
||
Permitted parent elements:
|
||
It must be the second element of an <html> element.
|
||
|
||
DOM interface:
|
||
HTMLBodyElement
|
||
The <body> element exposes the HTMLBodyElement interface.
|
||
You can access the body element through the document.body attribute. |