HTML - <body> Tag


Advertisements


Description

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

Example

Live Demo
<!DOCTYPE html>
<html>

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

</html>

This will produce the following result −

Global Attributes

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

Specific Attributes

The HTML <body> tag also supports the following additional attributes −

Attribute Value Description
alink rgb(x,x,x)
#xxxxxx
colorname
Deprecated − Specifies the color of the active links in the document.
background URL Deprecated − 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

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Yes Yes

html_tags_reference.htm

Advertisements