If you are curious how to build a website with HTML, here is the good news: the basics are far simpler than they look. HTML is just plain text with tags that tell the browser which part is a heading, which is a paragraph, and which is an image. You can get your first page showing in a browser in under ten minutes, with no expensive software, using only the text editor and browser already on your laptop.
In this guide we walk through it step by step from scratch, and then cover one thing most tutorials skip: when writing HTML yourself is a waste of time and using AI is the better call.
I will be honest throughout. Learning HTML is useful and genuinely fun, but having a business website that is live and winning work is a different goal. We will cover both, so you can choose with your eyes open.
What HTML is and why it still matters
HTML stands for HyperText Markup Language. Put simply, it is the language used to structure the content of a web page. Each piece of content is wrapped in a tag, such as <p> for a paragraph or <h1> for a main heading. The browser reads those tags and displays each piece in the right shape.
Even with all the instant tools around today, HTML is still the foundation of almost every page on the web. The fanciest website in the world is, at its lowest layer, still HTML. So understanding the basics gives you useful intuition, even if you later decide not to write it by hand. It is a bit like understanding how a car engine works: you do not have to be a mechanic to drive, but knowing the basics makes you more confident behind the wheel.
What you need before you start
The good news is the toolkit is minimal, and most of it is already installed:
- A text editor. Where you write the code. Notepad on Windows or TextEdit on Mac is enough for practice. If you want more comfort, download VS Code for free; it color-codes your markup so it is easier to read.
- A browser. Chrome, Firefox, or Edge already on your computer will show you the result.
- Later, hosting and a domain. These are only needed when you want your site visible to other people, not just open on your own machine. We cover that near the end.
Nothing needs to be bought to get started. This is one reason HTML is such a popular entry point for learning the web.

How to build a website with HTML: the basic page structure
Every HTML page has the same skeleton. Open your text editor, type the code below, then save it as index.html (make sure it ends in .html, not .txt).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sunset Coffee Bar</title>
</head>
<body>
<h1>Sunset Coffee Bar</h1>
<p>Manual brew coffee and homemade snacks in the heart of downtown.</p>
</body>
</html>
Let us break it down line by line so you are not just copying:
<!DOCTYPE html>tells the browser this is a modern HTML document.<html lang="en">wraps the whole page and states its language is English. This helps search engines and screen readers.<head>holds information that is not shown directly, such as the tab title and display settings.<meta name="viewport" ...>matters a lot. This line makes the page adapt to phone screens. Without it, your site looks tiny and hard to read on mobile.<title>is the text that appears in the browser tab and in Google results.<body>holds everything the visitor actually sees.
Save the file, then double-click index.html. Your first page opens in the browser. Congratulations, you have officially built a website with HTML.
It helps to picture the whole file as a family tree. <html> is the root, <head> and <body> are its two children, and every other tag is nested somewhere inside one of them. The diagram below shows the finished example page we build in this guide.

Tip: Keep all your project files in one dedicated folder, for example
coffee-site. Later, when you add images and other pages, everything stays tidy in one place and linking between files is far easier.
Adding content: headings, paragraphs, images, and links
That empty skeleton is not useful yet. Now we fill it with the elements small business sites use most. Place all of these inside <body>.
For layered headings, use <h1> through <h6>. Use one <h1> per page for the main name, then <h2> for big sections like "Menu" or "Location".
<h1>Sunset Coffee Bar</h1>
<h2>Our Favorites</h2>
<p>Iced brown sugar latte, V60 pour-over, and warm chocolate banana bread.</p>
For images, use the <img> tag. Put the photo file in the same folder, then name it:
<img src="latte.jpg" alt="Iced brown sugar latte in a clear glass">
Notice the alt attribute. It is a short description of the image. This is not filler: alt helps Google understand the picture and matters for visitors using screen readers.
For links, use the <a> tag. For example, a button to your booking page:
<p>Reserve a table on our <a href="https://example.com/book">booking page</a>.</p>
And for a list, such as opening hours, use <ul> with several <li> items:
<ul>
<li>Monday to Friday: 8am to 10pm</li>
<li>Saturday and Sunday: 9am to 11pm</li>
</ul>
With just these four elements, headings, paragraphs, images, and links, you can already build a complete business profile page. If you want to expand this base, our guide to making a website without coding shows the alternative approach side by side.
Making it look decent with a little CSS
At this point your site works but looks plain: black text on a white background, glued to the top-left corner. CSS is the language for controlling appearance, from colors and font sizes to spacing and layout. The easiest way for beginners is to put CSS inside <head> using a <style> tag.
<style>
body {
font-family: Arial, sans-serif;
max-width: 700px;
margin: 0 auto;
padding: 24px;
color: #333333;
}
h1 { color: #6b4423; }
a { color: #c2410c; }
</style>
That short block already makes a big difference: the text sits centered at a comfortable width, there is breathing room from the edges, and the heading and links have color. From here you can keep experimenting. Change the max-width number, swap the color codes, adjust the font size, then refresh the browser to see the result instantly.
Note: This is where the learning curve starts to climb. CSS has a lot of rules, and building a layout that looks genuinely polished across every screen size (phone, tablet, laptop) takes weeks of practice. If you enjoy the process, keep going. If you just want a good result without wading into the details, remember there is a shortcut we cover next.
Putting it together: the complete page with header, nav, main, and footer
So far the pieces have been scattered. Here is the whole index.html in one place, with one upgrade: the content is grouped into four semantic sections. These tags do not change how the page looks by default, but they tell browsers, search engines, and screen readers what each part is for.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sunset Coffee Bar</title>
<style>
body { font-family: Arial, sans-serif; max-width: 700px; margin: 0 auto; padding: 24px; color: #333333; }
h1 { color: #6b4423; }
a { color: #c2410c; }
</style>
</head>
<body>
<header>
<h1>Sunset Coffee Bar</h1>
<nav>
<a href="#menu">Menu</a> | <a href="#hours">Hours</a>
</nav>
</header>
<main>
<h2 id="menu">Our Favorites</h2>
<p>Iced brown sugar latte, V60 pour-over, and warm chocolate banana bread.</p>
<h2 id="hours">Opening Hours</h2>
<ul>
<li>Monday to Friday: 8am to 10pm</li>
<li>Saturday and Sunday: 9am to 11pm</li>
</ul>
<p>Reserve a table on our <a href="https://example.com/book">booking page</a>.</p>
</main>
<footer>
<p>Sunset Coffee Bar, downtown.</p>
</footer>
</body>
</html>
What each new section means:
<header>holds the introductory part of the page, here the business name and the menu links.<nav>wraps a block of navigation links. Thehref="#menu"links jump to the heading withid="menu"on the same page.<main>holds the content that is unique to this page. According to MDN's reference for the main element, a document must not have more than one visible<main>, so use it once.<footer>holds closing details such as the address or copyright line.

That is a real, working one-page website. It is plain, but every part of it is correct, and it gives you a clean base to style further.
The HTML tags you will use most
You do not need to memorize every element in the HTML Living Standard, which has been maintained by the WHATWG since the 2019 agreement between W3C and WHATWG. A small business page leans on a dozen at most:
| Tag | What it does | Typical use on a business page |
|---|---|---|
<h1> to <h6> |
Headings, from most to least important | Business name, section titles |
<p> |
A paragraph of text | Descriptions, story, offers |
<a href="..."> |
A link to another page or spot | Booking page, WhatsApp, menu jump |
<img src="..." alt="..."> |
An image with a text alternative | Product and venue photos |
<ul> and <li> |
A bulleted list | Opening hours, services |
<header>, <main>, <footer> |
Page regions with a clear role | Top bar, main content, contact line |
<nav> |
A block of navigation links | The menu |
One detail on alt: MDN's image reference notes that an empty alt="" marks an image as decoration, so screen readers can skip it. Use real descriptions for product photos and the empty value only for purely decorative graphics.
Common beginner mistakes, and how to fix them
Almost everyone hits the same handful of problems on their first HTML page. Check these in order when something looks off:
- The file saved as
index.html.txt. Some editors add.txtsilently. Turn on file extensions in your file manager and rename it. - A missing closing tag. Forget
</p>or</a>and the following text inherits the wrong formatting. Most tags need a pair; void elements such as<img>and<meta>do not. - A wrong image path. If the picture shows as a broken icon, the
srcdoes not match the file's real name or folder.Latte.jpgandlatte.jpgcan be different files on many web servers. - No viewport line. Without the
<meta name="viewport">tag, phones render the page as a shrunken desktop view. - Several
<h1>tags. Keep one main heading per page and use<h2>for sections, so the outline stays clear.
Fixing these five covers most of the "why does my page look weird" moments in the first week.
How to publish your HTML website so people can see it
A site on your computer cannot be seen by anyone else. For that you need two things: hosting (a place to store the files so they are served over the internet) and a domain (an address like sunsetcoffee.com).
The usual steps look like this:
- Pick hosting. For static HTML files, there are free static hosts that are fine for practice or a small site. For a serious business, paid hosting with your own domain looks more professional.
- Upload the files. You send
index.htmlalong with the image folder to the host, usually through an upload panel or an FTP app. - Point the domain. If you buy a domain, you connect it to the hosting through DNS settings.
- Check it on your phone. Open the address on mobile, not just on the laptop. This is the moment many people first notice the layout is a mess on small screens.
This process sounds involved at first, and it does take patience the first time. If you want to compare an approach that skips managing hosting yourself, our walkthrough on how to build a website with AI gives you the fuller picture.
How to build a website with HTML vs using AI: which fits you?
Now for the part most HTML tutorials will not admit. If your goal is genuinely to have a business website that is live and bringing in customers, writing HTML from scratch is often not the fastest route, and not the cheapest either once you count your time.
Here is my honest read after watching plenty of small business owners try it: they are excited for two evenings, the first page comes together, and then they stall on making it tidy on mobile, adding a form, setting up SEO basics, and dealing with hosting. A project meant to be "done this weekend" turns into a month that never quite launches. A half-finished site sitting in a laptop folder wins exactly zero orders.
Let us compare the two routes openly:
| Aspect | Writing HTML by hand | Using an AI website builder |
|---|---|---|
| Time to live | A few days to weeks | A few minutes for a first draft |
| Coding required | Yes, HTML plus CSS | No, just describe your business |
| Mobile-friendly automatically | You set it up yourself, needs practice | Mobile-friendly out of the box |
| Lead form to WhatsApp | Needs code and an extra service | Built in |
| SEO basics | Done by hand, one by one | Automatic on every page |
| Changing content | Edit code, then re-upload | Just type the change you want |
| Best for | Learning, small personal projects | A business site that must go live |
With a builder like Forgelo, you describe your business in a single sentence, and a ready-to-publish website appears a few minutes later. Want to change something? Just type "make the headline shorter" or "add a menu section with three options", with no code to touch. Contact forms route straight to your WhatsApp, so customer questions land where you already reply.
Tip: Learning HTML and using AI are not mutually exclusive. Plenty of people learn the HTML basics for understanding, then use a builder for the business site they actually rely on. That HTML foundation still helps you understand and fine-tune whatever the builder produces.
The takeaway
How to build a website with HTML comes down to this: get a text editor, write the <!DOCTYPE html> skeleton, fill the <body> with headings, paragraphs, images, and links, tidy it up with a little CSS, then upload it to hosting. For learning and small projects, this is a valuable and satisfying exercise. You understand how the web works from the roots up, and that is never wasted.
But if what you need is a business website live this week, tidy on mobile, with a WhatsApp form, and editable by you anytime, hand-writing all the HTML is often an expensive detour in terms of time. For that, letting AI handle the technical part while you focus on the content and the customers is usually the wiser call. You can look at the pricing to compare, and start from wherever you are right now. What matters is that your site is live and being seen, not perfect inside a folder.



