Have you ever wondered how websites appear on your screen when you click a link? π€
You open a browser, type a website address, and suddenly a beautiful page appears with text, images, buttons, animations, and interactive features. But behind every website you visit, there is a hidden language working quietly in the background.
That language is HTML (HyperText Markup Language).
HTML is the foundation of the modern web. Every website you use β from simple personal blogs to huge platforms like online stores and social networks β starts with HTML.
Think of HTML as the skeleton of a website. Just like the human body needs bones to create structure, websites need HTML to organize their content.
In this guide, we will explore:
β
What HTML is
β
How websites are built with HTML
β
How browsers understand HTML code
β
How to create your first HTML file
β
A practical mini project: Building a personal profile webpage
Letβs start our journey into the world of web development! π
π§© What Is HTML?
The Meaning Behind HTML
HTML stands for:
H β Hyper
T β Text
M β Markup
L β Language
HTML is not a programming language like JavaScript or Python. Instead, it is a markup language used to organize and describe content on a webpage.
HTML tells the browser:
“This is a title.”
“This is a paragraph.”
“This is an image.”
“This is a link.”
“This is a button.”
Basically, HTML gives meaning and structure to information.
For example, imagine you write this sentence:
Welcome to my website
Without HTML, the browser only sees plain text.
But with HTML:
<h1>Welcome to my website</h1>
The browser understands:
“This is a main heading. Make it important.”
ποΈ HTML: The Building Blocks of the Web
A website usually has three main technologies:
1. HTML β Structure π
HTML creates the foundation.
Example:
<h1>My Blog</h1>
<p>Welcome to my technology blog.</p>
HTML creates:
Headings
Paragraphs
Images
Links
Forms
Tables
2. CSS β Design π¨
CSS controls how things look.
Example:
h1 {
color: blue;
font-size: 40px;
}
CSS changes:
Colors
Fonts
Layouts
Animations
Responsive design
3. JavaScript β Interaction β‘
JavaScript makes websites dynamic.
Example:
alert("Welcome to my website!");
JavaScript can create:
Buttons that work
Menus
Games
Interactive applications
A simple comparison:
| Technology | Role |
|---|---|
| HTML | Skeleton of the website |
| CSS | Clothes and appearance |
| JavaScript | Brain and actions |
A website without HTML cannot exist.
π The Basic Structure of an Internet Website
Every website starts with an HTML document.
A simple HTML file looks like this:
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Hello World!</h1>
<p>This is my first webpage.</p>
</body>
</html>
Let’s understand each part.
π Understanding HTML Document Structure
1. <!DOCTYPE html>
This tells the browser:
“Hey browser, this is a modern HTML5 document.”
Example:
<!DOCTYPE html>
Without it, browsers may use older compatibility modes.
2. <html> Tag
This is the main container.
Everything inside this tag belongs to the webpage.
Example:
<html>
</html>
3. <head> Section
The head contains information about the webpage.
Users usually do not see this content directly.
Example:
<head>
<title>My Website</title>
</head>
It contains:
Page title
SEO information
Character settings
External files
4. <body> Section
The body contains everything users see.
Example:
<body>
<h1>Welcome</h1>
<img src="profile.jpg">
<p>Hello everyone!</p>
</body>
The body includes:
Text
Images
Videos
Buttons
Links
π How Websites Use HTML in Real Life
Let’s look at common websites.
A Blog Website
HTML creates:
Article titles
Paragraphs
Images
Categories
Author information
Example:
<article>
<h1>The Future of Artificial Intelligence</h1>
<p>
AI is changing the world...
</p>
</article>
An Online Store
HTML creates:
Product names
Prices
Images
Shopping buttons
Example:
<div>
<h2>Smart Laptop</h2>
<p>$999</p>
<button>
Buy Now
</button>
</div>
A Portfolio Website
HTML creates:
Personal introduction
Skills
Projects
Contact information
π How Does a Browser Read HTML Code?
Have you ever wondered what happens after you press Enter on a website address? π
A lot happens in milliseconds.
Let’s see the journey.
Step 1: You Enter a Website Address
Example:
www.example.com
Your browser sends a request to the website server.
Step 2: The Server Sends HTML Files
The server responds:
“Here is the HTML document.”
Example:
index.html
The browser downloads this file.
Step 3: Browser Creates the DOM
The browser reads HTML and creates something called:
DOM (Document Object Model)
The DOM is a tree-like structure.
Example:
HTML:
<body>
<h1>Hello</h1>
<p>Welcome</p>
</body>
Browser creates:
BODY
|
|-- H1
|
|-- P
Now the browser understands the webpage structure.
Step 4: Browser Loads CSS and JavaScript
The browser combines:
HTML + CSS + JavaScript
and creates the final webpage.
That beautiful website you see is the result of this process.
π‘ Practical Tip:
You can inspect HTML of any website.
Try this:
Open any website
Right-click
Select “Inspect”
Click the Elements tab
You can see the HTML structure behind the page.
Developers use this tool every day.
π οΈ Creating Your First HTML File
Now let’s build something!
Step 1: Create a Folder
Create a folder:
MyFirstWebsite
Step 2: Create an HTML File
Create:
index.html
The name “index” is commonly used because it is the default homepage.
Step 3: Add Your First Code
Open the file and write:
<!DOCTYPE html>
<html>
<head>
<title>My First Website</title>
</head>
<body>
<h1>Hello Internet! π</h1>
<p>
I created my first HTML website!
</p>
</body>
</html>
Step 4: Open It in Browser
Double-click:
index.html
Congratulations! π
You created your first webpage.
π§° Useful HTML Tags Every Beginner Should Know
Headings
HTML has six heading levels.
<h1>Main Title</h1>
<h2>Subtitle</h2>
<h3>Small Title</h3>
Tip:
Use only one main <h1> per page.
Paragraph
<p>
This is a paragraph.
</p>
Links
<a href="https://google.com">
Visit Google
</a>
Images
<img src="photo.jpg" alt="My Photo">
The alt attribute helps:
SEO
Accessibility
Screen readers
Lists
Unordered list:
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
Result:
HTML
CSS
JavaScript
π Mini Project: Create a Personal Profile Web Page
Now let’s build a simple portfolio page.
Project features:
β
Profile title
β
About section
β
Skills list
β
Contact link
Complete HTML Project Code
Create:
profile.html
Add:
<!DOCTYPE html>
<html>
<head>
<title>Cansu's Profile</title>
</head>
<body>
<h1>
Welcome to My Profile π
</h1>
<img src="profile.jpg"
alt="Profile Photo">
<h2>
About Me
</h2>
<p>
Hello! I am a web development enthusiast.
I love learning HTML and creating websites.
</p>
<h2>
My Skills
</h2>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
<li>Web Design</li>
</ul>
<h2>
Contact
</h2>
<p>
Email:
<a href="mailto:example@email.com">
Send Message
</a>
</p>
</body>
</html>
π¨ How Can You Improve This Project?
After creating your first version, try adding:
Add a Navigation Menu
<nav>
<a href="#about">
About
</a>
<a href="#skills">
Skills
</a>
<a href="#contact">
Contact
</a>
</nav>
Add Social Media Links
<a href="#">
LinkedIn
</a>
<a href="#">
GitHub
</a>
Add More Sections
Create:
Education
Projects
Experience
Certificates
π₯ Beginner Developer Tips
1. Practice Every Day
HTML is easy to learn but mastery comes from practice.
Build small projects:
Personal page
Blog layout
Recipe website
Product page
2. Always Use Semantic HTML
Instead of:
<div>
My Article
</div>
Use:
<article>
My Article
</article>
Semantic HTML makes your code:
β
Cleaner
β
More professional
β
Better for SEO
3. Learn by Inspecting Websites
Professional developers learn by observing.
Look at:
Website structures
HTML organization
Common patterns
The web is your classroom.
π Final Thoughts
HTML may look simple, but it changed the world.
A few lines of HTML code can become:
A personal website
A business platform
An online store
A social network
A global application
Every great developer starts with a simple:
<h1>Hello World!</h1>
HTML is not just code.
It is the language that gives the internet its structure.
So open your editor, write your first HTML file, and start building your own corner of the web! ππ
Your journey as a web creator begins with one simple tag. β¨
