Understanding HTML Tags and Elements

Learning web development in public. Writing simple, real-world explanations about web development concepts. Helping beginners understand why things work, not just how.
Search for a command to run...

Learning web development in public. Writing simple, real-world explanations about web development concepts. Helping beginners understand why things work, not just how.
No comments yet. Be the first to comment.
Every day, millions of users upload photos, videos, stories, and reels to Instagram. From a user's perspective, the process appears simple: select media, apply filters, add a caption, and tap "Post."
Building Offline-First Messaging Apps: How Messages Work Without Internet Modern messaging applications have transformed the way people communicate. Whether it's chatting with friends, collaborating w
In this article we'll explore about the Expo Router and React Navigation and answer which one to use in 2026. If you build mobile apps using React Native, one thing becomes obvious very quickly: Navig

Modern mobile apps are no longer just a collection of screens connected together. Apps like Instagram, WhatsApp, Uber, and Netflix operate at massive scale with millions of users, real time systems, o
In this article we'll be exploring react.js and the things of react.js that makes it popular and stand out among other libraries ( no fight over library vs framework ). We'll go through: What problem

Shkaai
68 posts
When we open a website, the first thing we notice is the design — colours, layout, animations.
But none of that comes first.
Before a website can look beautiful or interactive, it needs a structure.
Something that holds everything together.
Something that tells the browser what exists on the page.
That “something” is HTML.
HTML is not about beauty.
HTML is not about logic.
HTML is the skeleton of a webpage.
Just like a human body needs a skeleton to stand, a webpage needs HTML to exist in a meaningful way.
Imagine giving the browser plain text like this:
Welcome to my website
This is important
Click here
To us, it makes sense.
But to a browser, it’s just random text.
The browser doesn’t know:
What is a heading
What is a paragraph
What should be clickable
What is important
HTML exists to add meaning to content.
It tells the browser:
“This is a heading.”
“This is a paragraph.”
“This is a container.”
Without HTML, the browser is blind to structure.
Think of HTML tags as labels stuck on boxes .
If you’re moving houses and you write:
“Books”
“Clothes”
“Fragile”
You’re not changing the items — you’re explaining what they are.
HTML tags work the same way.
When you write:
<p>Hello world</p>
You are telling the browser:
“This text is a paragraph.”
The text stays the same.
The meaning changes.
Most HTML tags come in pairs.
Let’s break this down slowly.
<p>Hello world</p>
<p> → opening tag (start here)
</p> → closing tag (end here)
Hello world → content (the actual text)
Everything between the opening and closing tag belongs together.
This part confuses almost everyone at the beginning — so let’s clear it gently.

Example:
<p>
Example:
<p>Hello world</p>
So in simple words:
Tag = label
Element = label + content + meaning
When people say “HTML elements”, they usually mean the whole thing, not just the angle brackets.
Let’s look at a few very common and very important ones.
<p>Used for normal text.
<p>This is a paragraph.</p>
It tells the browser:
“This is readable content.”
<h1>Used for titles.
<h1>Welcome</h1>
It tells the browser:
“This is important.”
Headings create structure, not just bigger text.
<div>This is a container.
<div>
<p>Hello</p>
</div>
div doesn’t add meaning by itself.
It simply groups things together.
Think of it as a box used for organization.
<span>Used for small pieces inside text.
<p>Hello <span>World</span></p>
span is like highlighting a word inside a sentence — it doesn’t break the flow.
This is not about meaning — it’s about layout behavior.

Block elements:
Start on a new line
Take full width
Stack vertically
Examples:
<p>
<h1>
<div>
They behave like boxes stacked one below another.
Inline elements:
Stay in the same line
Take only required space
Live inside text
Examples:
<span>
<a>
They behave like words inside a sentence.
If it feels like a box, it’s probably block.
If it feels like a word, it’s probably inline.
One of the best ways to learn HTML is not memorization — it’s curiosity.
Right-click on any website and click Inspect.
You’ll see:
Real HTML
Real tags
Real structure
Suddenly, websites stop feeling magical and start feeling understandable.
HTML is not about making things pretty.
It is about giving content a backbone.
Once you understand HTML as a skeleton —
CSS as clothing —
and JavaScript as movement —
the web suddenly makes sense.
And that’s the moment learning becomes enjoyable.