• Page title
• Metadata
• Links to CSS
• Other information used by the browser
We'll explore the
<head> in detail later.9️⃣
<body>The
<body> contains the main content displayed on the webpage.For example:
<body>
<h1>Welcome</h1>
<p>This is my website.</p>
</body>
The user can see this content in the browser.
A simple way to remember:
<html>
│
├── <head>
│ → Information about the page
│
└── <body>
→ Visible page content
🔟
<!DOCTYPE html>You'll usually see this at the beginning of an HTML document:
<!DOCTYPE html>
It tells the browser that the document uses modern HTML standards.
It's a doctype declaration, not an ordinary HTML element.
🌐 Real-World Example
Imagine you're building a portfolio.
You might start with:
<h1>Deepak's Portfolio</h1>
<p>
Welcome to my portfolio website.
</p>
<h2>My Projects</h2>
<p>
Here are some of the projects I have built.
</p>
HTML provides the structure:
Portfolio
↓
Introduction
↓
Projects
↓
Project information
Later, CSS will make this structure visually appealing.
JavaScript can then add interactive behaviour.
🧩 HTML + CSS + JavaScript
Think about a car:
HTML → The structure
Provides the basic parts:
• Body
• Seats
• Wheels
• Dashboard
CSS → The appearance
Controls:
• Colors
• Size
• Design
• Layout
JavaScript → Behaviour
Controls things such as:
• Interactive controls
• Dynamic behaviour
• Responses to user actions
Together, they form the foundation of frontend web development.
🧠 Key Points to Remember
• HTML = HyperText Markup Language
• HTML structures webpage content.
• HTML is a markup language, not a programming language.
• HTML uses elements and tags.
•
<head> contains information about the document.•
<body> contains the main visible webpage content.•
<!DOCTYPE html> declares the document type.• HTML provides structure, CSS provides styling, and JavaScript provides behaviour.
Double Tap ❤️ For More