The <body>
tag in HTML represents the main content of an HTML document. It is a container for all the other HTML elements that make up the content of the page, such as headings, paragraphs, images, and links.
Here is an example of an HTML document with a <body>
element:
Copy code<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome to My Page</h1>
<p>Here is some information about me:</p>
<ul>
<li>Name: John</li>
<li>Age: 30</li>
<li>Location: New York</li>
</ul>
<img src="my-picture.jpg" alt="A picture of me">
</body>
</html>
In this example, the <h1>
, <p>
, <ul>
, and <img>
elements are all contained within the <body>
element.