Meregate.com
Saturday, November 28, 2026
Home › Computers › How to Create a Website Using HTML: A Simple Step-by-Step Guide (2026)

How to Create a Website Using HTML: A Simple Step-by-Step Guide (2026)

How to Create a Website Using HTML: A Simple Step-by-Step Guide (2026)

You do not need a website builder or any paid software to make a website. You can build a real, working website with just HTML, a free text editor, and a web browser. This guide shows you how to create a website using HTML, step by step, in plain words. No coding experience needed.

HTML stands for HyperText Markup Language. It is the code that gives a web page its structure: headings, paragraphs, images, links, and buttons. Every website on the internet uses HTML, even the ones built with fancy tools. When you learn the basics, you can build a simple site yourself and change anything you want, any time.

What Is HTML?

Think of a website like a house. HTML is the frame and the walls. It decides what goes where: the title at the top, the text in the middle, the links and pictures around it. CSS is the paint and furniture. It controls colors, fonts, and spacing. JavaScript adds movement, like a door that opens when you click it.

For a simple website, HTML and a little CSS are enough. You do not need JavaScript to start. You also do not need to learn a programming language. HTML is a markup language, which means you write tags around your text to tell the browser how to show it. For example, <h1> marks a main heading and <p> marks a paragraph.

What You Need Before You Start

You only need three things, and all of them are free:

  • A text editor. This is where you write your code. Visual Studio Code is free and popular, and it highlights your code so mistakes are easy to spot. You can also use the plain Notepad app on Windows or TextEdit on a Mac. Do not use Word or Google Docs. They add hidden formatting that breaks your code.
  • A web browser. Chrome, Firefox, Edge, or Safari all work. You will open your HTML file in the browser to see your site as you build it.
  • A folder on your computer. Make one folder for the whole project. Keep every file for your site in it, so links and images never break.

That is it. No hosting, no domain name, and no money needed until you decide to put the site online. You build the whole thing on your own computer first.

How to Create a Website Using HTML: 8 Simple Steps

Step 1: Plan Your Pages

Before you write any code, decide what your site needs. Most small sites have three or four pages: a home page, an about page, and a contact page. A business site might add a services page. Grab a piece of paper and sketch each page. Draw boxes for the heading, the text, and the pictures. This takes five minutes and saves you a lot of rework later.

Also decide on the goal of each page. The home page should tell visitors what the site is about in one or two lines. The about page tells your story. The contact page tells people how to reach you. When each page has one clear job, the site is easier to build and easier to use.

Step 2: Create a Project Folder and Your First File

Make a folder on your computer and name it something simple, like my-website. Open your text editor and create a new file. Save it inside that folder with the name index.html.

The name matters. Web browsers look for a file called index.html first when someone opens a website. It is the home page. Always save your files with the .html ending, not .txt. If your editor adds .txt by mistake, your page will not work.

Step 3: Write the Basic HTML Structure

Every HTML page starts with the same basic frame. Copy this into your index.html file:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My First Website</title>
</head>
<body>
  <h1>Hello, and welcome to my website</h1>
  <p>This is my first web page. I built it with HTML.</p>
</body>
</html>

Here is what each part does:

  • <!DOCTYPE html> tells the browser this is a modern HTML5 page. It always goes first.
  • <html> wraps the whole page. Everything sits inside it.
  • <head> holds details the visitor does not see, like the page title and the character set.
  • <title> is the text shown in the browser tab. It also shows up in Google search results, so make it clear.
  • <meta name="viewport"> makes the page fit phone screens. Do not skip this line.
  • <body> holds everything visitors see: headings, text, pictures, and links.

Save the file, then double-click it. It should open in your browser and show your heading and paragraph. You have just built your first web page.

HTML and code files open in a code editor
Source: Pexels

Step 4: Add Headings, Text, Links, and Images

Now fill the page with real content. These are the tags you will use most:

Headings. HTML has six heading sizes, from <h1> (biggest) to <h6> (smallest). Use one <h1> per page for the main title, then <h2> and <h3> for sections.

<h1>Welcome to My Bakery</h1>
<h2>Fresh Bread Every Morning</h2>
<p>We bake sourdough, baguettes, and croissants from scratch.</p>

Links. The <a> tag makes text clickable. The href part holds the web address.

<a href="about.html">Learn more about us</a>
<a href="https://www.example.com">Visit our supplier</a>

Images. The <img> tag shows a picture. The src part is the file name, and the alt part describes the picture for people who cannot see it and for Google.

<img src="images/bread.jpg" alt="Fresh sourdough bread on a wooden table">

Keep your pictures in an images folder inside your project folder. Always fill in the alt text. It helps with accessibility and SEO, and it shows up if the image fails to load.

Lists. Use <ul> for bullet lists and <ol> for numbered lists. Each item goes in an <li> tag.

<ul>
  <li>Sourdough</li>
  <li>Baguettes</li>
  <li>Croissants</li>
</ul>

Step 5: Add More Pages and Link Them Together

One page is a start, but a real website has a few pages. Create about.html and contact.html in the same folder, using the same basic frame from step 3. Then add a simple menu at the top of each page so visitors can move around:

<nav>
  <a href="index.html">Home</a>
  <a href="about.html">About</a>
  <a href="contact.html">Contact</a>
</nav>

The <nav> tag marks the menu area. Because all three files sit in the same folder, the links are short and simple: just the file name. If you move a file into a subfolder later, update its links or they will break.

Step 6: Style It With CSS

Plain HTML looks bare. CSS adds color, fonts, and spacing. Create a new file called style.css in your project folder and add a few simple rules:

body {
  font-family: Arial, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  line-height: 1.6;
  color: #222;
}

h1 {
  color: #1a5276;
}

a {
  color: #1a5276;
}

nav a {
  margin-right: 15px;
}

Then link the CSS file to your HTML page. Add this line inside the <head> section of each page:

<link rel="stylesheet" href="style.css">

Save both files and refresh your browser. The page should now have a clean font, a centered layout, and colored headings. Small changes go a long way. A readable font, enough white space, and one or two colors are all a simple site needs. You can learn more about tags and styling in MDN’s HTML guide, which is free and kept up to date by Mozilla.

Hands typing CSS code on a laptop keyboard
Source: Pexels

Step 7: Check It on Your Phone

More than half of all web traffic comes from phones, so test your site on a small screen before you publish it. In your browser, press F12 to open the developer tools and click the phone icon to preview a mobile view. Or just open the file on your phone with a file transfer.

Three quick checks cover most problems: the text should fit the screen without side-scrolling, pictures should shrink to fit (add max-width: 100%; to your img rule in CSS), and links and buttons should be big enough to tap with a finger. The viewport tag from step 3 does most of the work here. If a page looks wrong on mobile, the fix is usually a missing viewport tag or a fixed pixel width somewhere in your CSS.

Step 8: Put Your Website Online for Free

Your site works on your computer, but the world cannot see it yet. You need hosting. The good news is that a plain HTML site can be hosted for free. Three popular options are GitHub Pages, Netlify, and Cloudflare Pages. Netlify is the easiest for a first-timer:

  1. Go to Netlify and make a free account.
  2. Drag your whole project folder onto the Netlify dashboard.
  3. Netlify gives you a free web address, like my-website.netlify.app. Your site is live in under a minute.

GitHub Pages works in a similar way and is also free. You upload your files to a GitHub repository, turn on Pages in the settings, and your site goes live. GitHub’s own Pages guide walks through the setup.

If you want your own domain name, like mybakery.com, you can buy one from a domain registrar for around $10 to $15 a year and point it at your free hosting. You do not need to do this on day one. Start with the free address, and add a domain later when the site earns its keep.

Common Mistakes to Avoid

Beginners run into the same few problems. Watch out for these:

  • Saving the file with the wrong ending. It must be .html, not .txt. If the page shows raw code in the browser, this is usually the cause.
  • Forgetting a closing tag. Most tags come in pairs, like <p> and </p>. A missing closing tag can break the layout of everything below it.
  • Broken image links. If a picture does not show, check the file name and the folder. Capitals matter: Bread.jpg and bread.jpg are different files.
  • Skipping the viewport tag. Without it, your page looks tiny on phones.
  • Testing only on a desktop. Always check the phone view before you publish.
  • Using absolute file paths. A link like C:\Users\me\my-website\about.html works on your computer and nowhere else. Use simple file names instead.

When something looks wrong, check the file names first, then the tags. Nine times out of ten, the fix is a typo.

HTML vs a Website Builder: Which Should You Pick?

Building with HTML is free, fast, and fully under your control. Your pages load quickly, you own every file, and nothing costs a monthly fee. The trade-off is time: you build each page by hand, and adding a contact form or a blog takes extra work.

A website builder like Wix or Squarespace is faster to start with and handles forms, hosting, and updates for you. The trade-off is cost and control: you pay every month, and you can only change what the builder allows.

Pick HTML if you want to learn how websites really work, keep costs at zero, and build a simple site you fully own. Pick a builder if you need a shop, bookings, or a blog this week and do not want to touch code. There is no wrong answer. Many people start with HTML, learn the basics, and then choose a builder later with a much better idea of what they need.

What to Do After Your Site Is Live

Publishing is not the last step. Do these five things to make your site useful:

  1. Write a good title and description for each page. The <title> tag and a short <meta name="description"> are what Google shows in search results.
  2. Add a favicon. This is the small icon in the browser tab. It makes your site look finished.
  3. Click every link. Check that each page, picture, and menu link works.
  4. Share the address. Put the link on your social profiles, your email signature, and your business cards.
  5. Keep it fresh. Update your content when things change. A site that never changes looks abandoned, and visitors notice.

Frequently Asked Questions

Can I create a website using only HTML?

Yes. HTML alone can build a full website with pages, text, pictures, and links. CSS is not required, but it makes the site look much better, so most people add at least a little of it. JavaScript is optional and only needed if you want things like slide shows or pop-ups.

Do I need to know CSS too?

You need only the basics: how to change fonts, colors, and spacing. You can learn enough CSS in an afternoon to make a clean, simple site. Start with a few rules in one style.css file and add more as you go.

How do I put my HTML website online for free?

Use a free static host like Netlify, GitHub Pages, or Cloudflare Pages. You upload your project folder, and the host gives you a free web address. No server setup is needed because plain HTML sites do not need a database or any back-end code.

How long does it take to build a website with HTML?

A simple one-page site takes one to two hours if you are following a guide. A small site with three or four pages takes a day or two of relaxed work. The more you practice, the faster it gets. Most of the time goes to writing the words and picking pictures, not to the code itself.

Is HTML hard to learn?

No. HTML is one of the easiest places to start with code. There are only a few dozen tags, and you use about ten of them for most pages. You see results at once, which makes it a good first step for anyone who wants to learn how websites work.

Building a website with HTML is simpler than most people expect. You write a file, open it in a browser, and you have a web page. Add a few pages, a little styling, and free hosting, and you have a real website that anyone in the world can visit. Start with one page today. You can always add more tomorrow.

Taylor Orlando

Taylor Orlando is a content writer at Meregate covering websites, SEO, and AI. Taylor breaks down complex topics into simple, practical guides that help small businesses build better websites, rank higher on Google, and get real value from AI tools — no jargon, no fluff.

Related Articles