Document content... "> Document Title Document content... " />
Easy Tutorial
❮ Tag Center Tag Th ❯

HTML <body> Tag

Example

A simple HTML document containing the minimum required tags:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Document Title</title>
</head>

<body>
Document content...
</body>

</html>

Browser Support

All major browsers support the <body> tag.


Tag Definition and Usage

The <body> tag defines the document's body.

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


Differences Between HTML 4.01 and HTML5

In HTML5, all "presentation attributes" of the body element have been removed.

In HTML 4.01, all "presentation attributes" of the body element are deprecated.


Attributes

Attribute Value Description
alink color Not supported in HTML5. Deprecated in HTML 4.01. Specifies the color of active links in the document.
background URL Not supported in HTML5. Deprecated in HTML 4.01. Specifies a background image for the document.
bgcolor color Not supported in HTML5. Deprecated in HTML 4.01. Specifies the background color of the document.
link color Not supported in HTML5. Deprecated in HTML 4.01. Specifies the color of unvisited links in the document.
text color Not supported in HTML5. Deprecated in HTML 4.01. Specifies the color of all text in the document.
vlink color Not supported in HTML5. Deprecated in HTML 4.01. Specifies the color of visited links in the document.

Global Attributes

The <body> tag supports HTML's global attributes.


Event Attributes

The <body> tag supports HTML's event attributes.


Related Articles

HTML Tutorial: HTML Elements

HTML DOM Reference: Body Object

❮ Tag Center Tag Th ❯