DEV Community

Cover image for HTML tags | body
Carlos Espada
Carlos Espada

Posted on

HTML tags | body

It represents the content of an HTML document. There can be only one <body> element in a document and it must be the second child of an <html> element.

The <body> element contains all the contents of an HTML document, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.

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.

It has an implicit ARIA role document.

  • Type: block
  • Self-closing: No
  • Semantic value: No

Definition | Example | Support

Discussion (0)