HTML — The Foundation of Every Website
Every website you've ever used — Google, YouTube, Swiggy — is built with HTML at its core. HTML stands for HyperText Markup Language. It's not a programming language; it's a markup language — you use it to tell the browser what each piece of content is.
Think of HTML as the blueprint of a building. It defines where the walls, doors, and windows go. The paint and furniture is CSS. The electricity and plumbing that makes things work is JavaScript.
Your First HTML Page
Open any text editor (Notepad, VS Code). Paste this, save it as index.html, and open it in Chrome:
<!DOCTYPE html>
<html>
<head>
<title>My First Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is my first webpage.</p>
</body>
</html>
Open the saved file in your browser. You'll see a heading and a paragraph. You just built a webpage.
What Each Part Does
<!DOCTYPE html>— Tells the browser this is an HTML5 document<html>— The root container for the whole page<head>— Behind-the-scenes info (title, styles). Not visible to users.<title>— Text shown on the browser tab<body>— Everything users actually see goes here
Real-World Example — A Restaurant Page
<!DOCTYPE html>
<html>
<head>
<title>Sharma's Dhaba — Mumbai</title>
</head>
<body>
<h1>Sharma's Dhaba</h1>
<p>Fresh home-style food, served since 1985.</p>
<h2>Today's Specials</h2>
<p>Dal Makhani — Rs.150</p>
<p>Butter Chicken — Rs.200</p>
</body>
</html>
HTML just gives content its structure. It looks plain right now — CSS handles the visual design.
Key Takeaways
- HTML = structure | CSS = style | JavaScript = behaviour
- Every page starts with
<!DOCTYPE html> - Visible content goes inside
<body> - No server needed — just a text editor and a browser
Try It Yourself
Create about-me.html with your name as an h1, a sentence about yourself in a p, and your city.