Loading...
HTML <body> Tag

HTML <body> Tag

In this tutorial, we will learn about body tag in HTML with the help of examples.


<body> Tag

Body tag <body> tag is used to define the body of the HTML document i.e. all the visible content such as headings, images, paragraphs, hyperlinks, table, list, etc.

Note : We can use only one <body> tag in an HTML document.

Syntax

<body>....</body>

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Body Tag</title>
  </head>
  <body>
    <p>Welcome to algbly.com</p>
  </body>
</html>

Output

Welcome to algbly.com


Specific Attribute

Attribute Value Description
alink rgb(x,x,x)
#xxxxxx
colorname
Deprecated - It specifies the color of the active links in the HTML document
background URL Deprecated - It specifies the background image file path
bgcolor rgb(x,x,x)
#xxxxxx
colorname
Deprecated - It specifies the background color
link rgb(x,x,x)
#xxxxxx
colorname
Deprecated - It specifies the color of all the links in the HTML document
text rgb(x,x,x)
#xxxxxx
colorname
Deprecated - It specifies the color of the text in the HTML document
vlink rgb(x,x,x)
#xxxxxx
colorname
Deprecated - It specifies the color of the visited links in the HTML document

Note : We must have to provide the cite attribute for <blockquote> tag if the quote is taken from other source.


Global Attribute

Body Tag support all the global attributes of HTML.


Event Attribute

Body Tag support all the event attributes of HTML.


Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of body tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML br Tag.

- Related Topics