<body> tag

HTML <body> tag

The <body> tag defines the actual content of the document which is displayed to the user.

Most of the HTML tags are included in the <body> tag.

But, the tags which are not coded inside the <body> tag are –

  • <html> tag
  • <head> tag
  • <!DOCTYPE> tag
  • <title> tag

Syntax:
<body>
     Elements, Tags, Images, Links, Content, Tables, Links
</body>

Example

<body>
  Body content of the document……
</body>

Default CSS Values

display: block;
margin: 8px;

How Browser will display

BLOCK Level.

Difference between HTML4.01, XHTML and HTML5

HTML4 XHTML HTML5
None None None

Attributes used with <body> tag

Attribute Description
alink Sets the color of a link which is active.
(HTML5 does not support this attribute).
background To set the background URL image to the HTML document.
(HTML5 does not support this attribute).
bgcolor To set the background color to the HTML document.
(HTML5 does not support this attribute).
link Sets the color of a link which is an unvisited link.
(HTML5 does not support this attribute).
text Sets the color of the text of HTML document.
(HTML5 does not support this attribute).
vlink Sets the color of a link which is a visited link.
(HTML5 does not support this attribute).

Global Attributes

The <body> tag supports Global attributes.

Event Attributes

The <body> tag supports Event attributes.

Supporting Browsers

supporting-browsers for tags

Related Tags

<html> & <head> tags.

Tutorials for all brains!