HTML — Introduction
HTML documents are made of elements
An element is the building block of every web page. It usually has three parts:
<tag>Content</tag>
For example:
<p>Hello World!</p>
Here:
<p>= opening tag — "a paragraph starts here"Hello World!= content — what the visitor sees</p>= closing tag — the slash means "element ends here"
Together, they form one paragraph element.
Example
<h1>My Website</h1>
<p>Welcome to my website.</p>
The browser renders:
My Website
Welcome to my website.
(A big bold heading followed by a normal paragraph.)
HTML is not a programming language
This confuses many beginners, so let's be precise: HTML is a markup language, not a programming language.
Programming languages (Python, JavaScript, Java…) can:
- Make decisions (
if this, then that) - Repeat actions (loops)
- Do calculations
- Remember and change data
HTML does none of that. Its only job is to describe structure — it labels content so the browser knows what each piece is.
The three layers, in code
The same page needs all three layers to feel complete.
HTML provides the structure:
<h1>Student Information</h1>
<p>Name: Rahul</p>
CSS controls the appearance:
h1 {
color: blue;
}
JavaScript adds behavior:
alert("Welcome!");
Remember it as:
HTML → Structure
CSS → Appearance
JavaScript → Behavior
Why "markup" matters so much
Imagine reading a book with no chapter titles, no paragraphs — just a wall of text. That's what a page without HTML would be.
Markup lets machines understand your content too:
| You write | The browser understands |
|---|---|
<h1> | "This is the most important heading" |
<p> | "This is a paragraph of text" |
<a href="..."> | "This links somewhere else" |
<img src="..."> | "Show an image here" |
Search engines use these meanings to rank pages. Screen readers use them to read pages aloud for blind users. Writing good HTML = being understood everywhere.
Good to know: browsers are forgiving. If you make a mistake, they'll usually still display something — but possibly not what you intended. Learning correct HTML from the start saves hours of confusion later.
Mini Practice
Identify the parts — for each line below, name the opening tag, content, and closing tag:
<h2>About Me</h2>
<p>I love coding.</p>
Then create a file test.html with those two lines inside <body>, open it in a browser, and change the text. Refresh. See the result? That loop — edit, save, refresh — is 90% of web development.
Next: the tools professionals use to write HTML →
Related Topics
Frequently Asked Questions about Introduction
What is Introduction in HTML?
Introduction is a fundamental concept in HTML. This lesson explains it step by step with clear examples, making it easy for beginners to understand.
How do I learn Introduction?
Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Introduction.
Why is Introduction important in HTML?
Introduction is essential for HTML development. Understanding this concept will help you write better code and solve real-world problems more effectively.