Every web page you have ever opened, from a news site to an online bank, starts as plain text written in HTML. In this lesson you will learn what HTML is, what job it does, and how your browser reads it. Throughout this tutorial we will build a small site for an imaginary neighbourhood cafe called Brew and Byte, so every example fits into one project.
What HTML stands for#
HTML stands for HyperText Markup Language.
- HyperText means text that can link to other text. A link is what makes the web a web.
- Markup means you wrap ordinary text in labels that describe what it is: a heading, a paragraph, a list, a link.
- Language means there is an agreed vocabulary and grammar that every browser understands.
HTML is not a programming language. It has no variables, loops or conditions. It describes the structure and meaning of content. Two other technologies join it in every page you build:
| Technology | Job | Example |
|---|---|---|
| HTML | Structure and meaning | "This is the main heading" |
| CSS | Presentation | "Headings are dark green" |
| JavaScript | Behaviour | "Open the menu when clicked" |
Think of a house. HTML is the walls and rooms, CSS is the paint and furniture, and JavaScript is the electricity and plumbing.
How a browser reads HTML#
When you visit a page, this happens in a few milliseconds:
- Your browser asks a server for the page.
- The server replies with a text file full of HTML.
- The browser reads the file from top to bottom and builds an internal tree of every element, called the DOM (Document Object Model).
- It combines that tree with styles and draws the result on screen.
You never "run" HTML. A browser simply interprets it. That is also why HTML is forgiving: if you forget a closing tag, the browser guesses what you meant instead of crashing. Helpful, but it can hide mistakes, so we will practise writing clean markup from the start.
A tiny taste#
Here is the smallest useful piece of HTML, a heading and a sentence for the cafe:
<!-- A heading, then a paragraph describing the cafe -->
<h1>Welcome to Brew and Byte</h1>
<p>Fresh coffee, quiet corners and free Wi-Fi.</p>Each piece is wrapped in tags inside angle brackets. <h1> opens a top-level heading and </h1> closes it. <p> and </p> wrap a paragraph. The browser uses those labels to decide what is important, how screen readers announce it, and how search engines understand it.
Why semantics matter#
Picking the right element helps three audiences at once:
- Visitors using assistive technology. A screen reader can jump from heading to heading, but only if you used real headings.
- Search engines. Clear structure helps them understand what the page is about.
- Future you and your teammates. Meaningful markup is easier to read and maintain.
Common mistakes#
- Believing HTML is a programming language. It is a markup language, and that is a strength, not a weakness.
- Writing everything as generic text and relying on styling to make it look like a heading. A big bold paragraph is still just a paragraph to a screen reader.
- Skipping the basics because "the browser fixes it anyway". Invalid HTML can behave differently across browsers.
Try it yourself#
On paper (or in a notes app), plan the home page of a project you care about: a portfolio, a cafe, a club. List five pieces of content, such as a main title, a short intro and a contact link. Next to each, write what kind of content it is (heading, paragraph, link, list). You have just done the first step of marking up a page.
Recap#
HTML is the markup language that gives web content structure and meaning, while CSS styles it and JavaScript makes it interactive. Browsers read your HTML top to bottom and build a tree they display. Choose elements for what the content means.
Check your understanding
Lesson quiz
OptionalA short quiz to check what you just learned.
- Questions
- 4
- Time limit
- 5 min
- Pass mark
- 70%
- Best score
- -