HTML <body> Tag

Advertisements


Description

The HTML <body> tag is used for indicating the main content section of the HTML document. The body tag is placed between the and the tags.

Example

<!DOCTYPE html>
<html>
<head>
<title>HTML body Tag</title>
</head>
<body>
Body of the document...
</body>
</html>

This will produce following result:

Body of the document...

Global Attributes

This tag supports all the global attributes described in - HTML Attribute Reference

Specific Attributes

The HTML <body> tag also supports following additional attributes:

AttributeValueDescription
alink rgb(x,x,x)
#xxxxxx
colorname
Deprecated - Specifies the color of the active links in the document.
background URLDeprecated - Specifies the background image file path.
bgcolor rgb(x,x,x)
#xxxxxx
colorname
Deprecated - Specifies the background color.
link rgb(x,x,x)
#xxxxxx
colorname
Deprecated - Specifies the color of all the links in the document.
text rgb(x,x,x)
#xxxxxx
colorname
Deprecated - Specifies the color of the text in the document.
vlink rgb(x,x,x)
#xxxxxx
colorname
Deprecated - Specifies the color of the visited links in the document.

Event Attributes

This tag supports all the event attributes described in - HTML Events Reference

Browser Support

ChromeFirefoxIEOperaSafariAndroid
YesYesYesYesYesYes

html_tags_reference.htm

Advertisements