HTML body Tag

HTML <body> Tag: The HTML body tag specifies define the main content present inside an HTML page. It is always enclosed within <html>tag. The <body> tag is the last child of <html> tag. A body tag contains starting as well as an ending tag. It contains all the contents of an HTML document like text, images, list, tables, etc.

HTML <body> Tag

The HTML <body> tag supports both the global and event attributes.

Syntax: <body>–content–</body>

Attributes

There are many attributes in HTML  body tag which is depreciated from HTML5 are listed below:

background: It contains the URL of the background image. It is used to set the background image.
bgcolor: It is used to specify the background color of an image.
alink: It is used to specify the color of an active link.
link: It is used to specify the color of visited links.
text: It specifies the color of the text in a document.
vlink: It specifies the color of visited links.

Example:

<!DOCTYPE html>
<html>
<head>
<title>Title of an article</title>
</head>
<body>
The content of the document......
</body>

</html>

Output:
The content of the document……

Attributes supported by the <body> tag

Attribute Value Description
alink color Describes the color of an active link in a document
background URL Specifies a background image for a document
bgcolor color Describes the background color of a document
Link color Specifies the color of unvisited links in a document
text color specifies the color of the text in a document
vlink color Specifies the color of visited links in a document