In this chapter of HTML we will learn about <body> tag of HTML. This tag forms the entire body of our web page.This tag defines the main content of the HTML document.It may contain content image, paragraph, paragraph, table, headings, etc.
<body> HTML contains the second element after <head> tags. This tag must be included once in the entire document and this tag is required in each notification document.
Its Syntax is written as :-
<body>Content................</body>
Browser Support:-
All modern browsers support <body> tag of HTML.
Attributes:-
Attribute | Value | Description |
background | URL | Specifies a background image for a document Not supported in HTML5. |
alink | color | Specifies the color of an active link in a document Not supported in HTML5. |
bgcolor | color | Specifies the background color of a document Not supported in HTML5. |
link | color | Specifies the color of unvisited links in a document Not supported in HTML5. |
text | color | Specifies the color of the text in a document Not supported in HTML5. |
vlink | color | Specifies the color of visited links in a document Not supported in HTML5. |
Example:-
<!DOCTYPE html>
<html>
<head>
<title>HTML body tag</title>
</head>
<body>
<h2>HTML body tag Example</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officiis, quia.</p>
</body>
</html>
Output:-
