Learn HTML – Part 3 – body Tag – Displaying Visible Content
The HTML body tag contains all the visible content of a webpage. Everything you see on a website is placed inside the body tag.
Text, images, links, videos, lists, tables — all are written inside this section.
What is the body Tag?
The body tag is placed inside the html tag and comes after the head section.
Unlike the head tag, the content inside the body tag is visible to users.
Basic Structure
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
</head>
<body>
<h1>Welcome</h1>
<p>This is my first webpage.</p>
</body>
</html>
Everything between <body> and </body> is displayed in the browser window.
What Can Be Placed Inside body?
- Headings (
h1toh6) - Paragraphs (
p) - Images (
img) - Links (
a) - Lists (
ul,ol) - Tables (
table) - Forms (
form)
Example – Simple Web Page Content
<body>
<h1>Learn HTML</h1>
<p>HTML is the foundation of web development.</p>
<a href="#">Read More</a>
</body>
Output:
Learn HTML
HTML is the foundation of web development.
body vs head – Key Difference
| Feature | head | body |
|---|---|---|
| Visible to Users? | No | Yes |
| Contains | Metadata | Page Content |
| SEO Role | Meta Information | Content Structure |
Important Notes
- Every HTML document must have one
bodytag. - It should come after the
headtag. - All visible elements must be placed inside it.
If the
bodytag is missing, the webpage will not display content correctly.
Conclusion
The HTML body tag is where all visible webpage content is written.
It works together with the html and head tags to form the complete structure of a webpage.
What’s Next?
Now that you understand the body tag, the next step is learning about heading tags, which help structure content and improve readability on a webpage.
Next: Learn HTML – Part 4 – Heading Tags – h1 to h6 Explained →
Series: Learn HTML Series
