Lesson 1.1 4 min read
What Is HTML? A Simple Guide for Complete Beginners
HTML is the language that gives every web page its structure. In this guide you will learn what HTML is, how it works with CSS and JavaScript, and how a browser reads it.
What is HTML?
HTML stands for HyperText Markup Language. Let's break that name into small pieces.
- HyperText means text that can link to other text. When you click a link and jump to a new page, that is hypertext.
- Markup means you "mark" parts of your content to say what they are. You say "this is a heading", "this is a paragraph", "this is an image".
- Language means there are rules that everyone (and every browser) agrees on.
HTML is not a programming language. It does not do maths or make decisions. It only describes content. Think of it like the labels on boxes when you move house: "kitchen", "books", "fragile". The labels don't change what is inside, but they tell people what each box is.
Here is a tiny piece of HTML:
<h1>My Favourite Recipes</h1>
<p>These are the meals I cook every week.</p>
The browser shows "My Favourite Recipes" as a big heading and the next line as a normal paragraph. The words inside the angle brackets, like <h1> and <p>, are called tags. You will learn all about them later in this module.
HTML vs CSS vs JavaScript: what is the difference?
Almost every website uses three languages together. A house is a good way to picture them.
| Language | Job | House comparison |
|---|---|---|
| HTML | Structure and content | The skeleton: walls, rooms, doors |
| CSS | Looks and layout | The paint, wallpaper and furniture |
| JavaScript | Behaviour and interaction | The electricity: lights, doorbell, alarm |
You can build a house with no paint and no electricity. It is plain, but you can still walk inside. In the same way, a page with only HTML works. It is plain, but people can read it. CSS makes it look nice, and JavaScript makes it react when you click or type. This course starts with HTML because everything else is built on top of it.
Note: In this module we only write HTML. Your pages will look simple, and that is fine. CSS handles the looks, and you will learn it later.
How does a browser read HTML?
A browser is the program you use to visit websites, such as Chrome, Firefox, Safari or Edge. When you open a web page, this happens:
- The browser asks a computer somewhere on the internet (a server) for a file.
- The server sends back an HTML file. It is just plain text.
- The browser reads the HTML from top to bottom.
- It builds a picture of the page in memory, and then draws it on your screen.
The browser is very forgiving. If you make a small mistake, it usually tries to guess what you meant instead of showing an error. That is friendly, but it also means mistakes can hide. Later you will learn how to check your code.
What is a web page, really?
A web page is a text file that ends in .html. You can open it in a simple text editor and read every word. Here is a complete, very small web page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Sam's Bakery</title>
</head>
<body>
<h1>Sam's Bakery</h1>
<p>Fresh bread every morning from 7 am.</p>
</body>
</html>
If you save this as bakery.html and open it in a browser, you will see a large heading "Sam's Bakery" and one line of text below it. The browser tab will also say "Sam's Bakery". Don't worry about every line yet. We will explain each one in the boilerplate lesson.
Images, videos and styles are usually separate files. The HTML file points to them, and the browser loads them too. So a "web page" is really an HTML file plus everything it links to.
Practice exercise
Visit any website you like. Write down three things on the page that you think are headings, two that are paragraphs, and one that is a link. This trains your eyes to see the structure behind every page.
Hint: headings are usually bigger and bolder text. Links often change your mouse pointer into a hand.
Frequently asked questions
Is HTML hard to learn?
No. HTML is one of the easiest computer languages to start with. You can write your first working page in a few minutes, and you can learn the most common tags in a few days.
Is HTML a programming language?
No. HTML is a markup language. It describes content but cannot make decisions or do calculations. For that, websites use JavaScript.
Do I need to install anything to use HTML?
You only need a text editor and a web browser. Both are free. The next lesson shows you how to set them up.
Key takeaways
- HTML stands for HyperText Markup Language and describes the structure of a web page.
- HTML is the skeleton, CSS is the paint, and JavaScript is the electricity.
- A browser downloads an HTML file, reads it from top to bottom and draws the page.
- A web page is a plain text file ending in
.html, plus the files it links to.