HTML Basics: Build Your First Web Page in 5 Easy Steps
HTML is the skeleton of every website. It tells the browser what is a heading, what is a paragraph and where an image goes. You don't need any setup — just a text editor and a browser.
By Learn Refill Mentors · Updated
Why learn HTML?
- Every website on the internet uses HTML
- It is the first step before CSS, JavaScript and React
- You can see results in the browser instantly
1Create your first HTML file
Create a file called index.html and paste this basic structure. The head holds page info, the body holds what users see.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>My First Page</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>2Add headings and paragraphs
Use h1 for the main title (only one per page), h2–h6 for sub-headings and p for normal text.
<h1>About Me</h1>
<p>I am learning web development at Learn Refill.</p>
<h2>My Goals</h2>
<p>Build my own portfolio website.</p>3Add links and images
The a tag creates a link using href. The img tag shows an image — always add alt text so screen readers and Google understand it.
<a href="https://www.learnrefill.com">Visit Learn Refill</a>
<img src="photo.jpg" alt="My profile photo" width="200" />4Make lists
Use ul for bullet lists and ol for numbered lists. Each item goes inside li.
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>5Use semantic tags
Tags like header, nav, main, section and footer describe the meaning of each part. They make your page easier to read, more accessible and better for SEO.
<header>My Website</header>
<nav><a href="#about">About</a></nav>
<main>
<section id="about">...</section>
</main>
<footer>© 2026 Me</footer>Common mistakes
- Forgetting to close tags like </p> or </li>
- Using many h1 tags on one page
- Leaving out alt text on images
Practice task
Build a one-page 'About Me' website with a heading, a photo, a short bio, a list of your skills and a link to your email.
Frequently asked questions
Is HTML a programming language?
No. HTML is a markup language — it describes the structure of content. Logic comes later with JavaScript.
How long does it take to learn HTML?
The basics can be learned in about a week of daily practice. Using it well comes with building projects.