HTML <body> Tag

The <body> element defines an HTML document's content. You can place only one <body> element in a document.

The<body> element is used inside all HTML document contents like text, lists, images, hyperlinks, tables, etc.

This HTML element is found within the <html> tag.

Syntax

The <body> element comes in pairs. The content must be written between opening (<body>) and closing ( </body>) elements.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>This is the title area for the document.</title>
  </head>
  <body>
    And we must place here the content of the document...
  </body>
</html>

Attributes

Attributes Value Description
alink color Defines the color of an active link in a document.
It is not in use anymore after HTML5.
background URL Defines a background image for a document.
It is not in use anymore after HTML5.
bgcolor color Defines a background color for a document.
It is not in use anymore after HTML5.
link color Defines unvisited links' color in a document.
It is not in use anymore after HTML5.
text color Defines the text color of a document.
It is not in use anymore after HTML5.
vlink color Defines visited links' color in a document.
It is not in use anymore after HTML5.

The <body> element uses the Global Attributes.