<body> Tag in HTML

The <body> tag is one of the essential HTML tags. It is used to define the content of the webpage, which is visible to the user in the browser. All the visible elements such as text, images, tables, links, and other media are enclosed within the <body> tag.

Key Points on <body> Tag:

Syntax of <body> Tag:

Syntax Example

<body>
            
        </body>

Example of <body> Tag in HTML:

This example demonstrates how the <body> tag is used to enclose the content of a webpage.

Code Example


<html>
<head>
    <title>Example Page</title>
</head>
<body>
    <h1>Welcome to My Website</h1>
    <p>This is an example of the <body> tag in HTML.</p>
    <img src="B1.jpg" alt="Sample Image">
</body>
</html>

Output

Welcome to My Website

This is an example of the <body> tag in HTML. Sample Image

The <body> tag is crucial for defining the visible part of the webpage. It is used in combination with the <head> tag to create a structured HTML document. While the <head> tag contains metadata, scripts, and links to external files, the <body> tag contains all the content that the user interacts with on the page.