Lesson 1 of 51 · Module 1, lesson 1 of 6 · 6 min

What HTML is and how a web page reaches you

Learn what a web page is made of, what a browser does with it, and where HTML fits next to CSS and JavaScript.

What you'll learn

  • What a web page is made of
  • What a browser does with an HTML file
  • What HTML does, and what CSS and JavaScript do

Why this matters

Every website you use — a news site, an online shop, a school portal — is built on HTML. Before you write any code, it helps to see what happens when a page appears on your screen. This lesson has no setup and no typing. It gives you a picture of the whole journey, so that the next lessons make sense.

Words you will meet

  • Web page: one document that you see in a browser tab.
  • Website: a group of web pages that link to each other.
  • Browser: the program you use to look at web pages. Chrome, Edge, Firefox and Safari are browsers.
  • File: one saved item on a computer, with a name, such as photo.jpg or index.html.
  • Code: text written in a fixed format, so that a program can read it and follow it.

A web page is a text file

This surprises many people: a web page is a plain text file. You can open it and read it. What makes it special are the words inside angle brackets < >. They are called tags. Tags tell the browser what each piece of text is: "this is a heading", "this is a paragraph", "this is a link".

Here is a very small web page:

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>My recipe</title>
</head>
<body>
  <h1>Tomato soup</h1>
  <p>A warm soup for a cold day.</p>
</body>
</html>

What you'll see: a large, bold heading "Tomato soup", a line of normal text under it, and the words "My recipe" on the browser tab.

A browser window with the tab title "My recipe". The page shows a large bold heading "Tomato soup" and, below it, the sentence "A warm soup for a cold day." in normal text.

You do not need to understand every line yet. In the lesson The HTML page skeleton you will go through each one. For now, notice two things:

  • <h1> and </h1> go around the heading.
  • <p> and </p> go around the paragraph.

The tags do not appear on the page. Only the text between them does.

What HTML is

HTML stands for HyperText Markup Language.

  • Markup means adding labels (tags) to text, to say what each part is.
  • HyperText means text that contains links to other pages.

HTML is not a programming language. It does not calculate anything or make decisions. It describes the structure and meaning of content. This is why HTML is a good first language: you write a few lines and see the result straight away.

How a web page reaches your screen

Three steps from left to right. Step 1, a file: plain text with tags, saved as index.html on your computer or on a web server. Step 2, the browser reads it: it learns that h1 means a main heading and p means a paragraph. Step 3, you see the page: the tags are hidden and the text is drawn as a heading and a paragraph.

  1. Someone writes an HTML file and saves it.
  2. The file is stored on a computer. It can be your own computer, or a web server: a computer on the internet whose job is to send pages to anyone who asks for them.
  3. Your browser opens the file and reads the tags from top to bottom.
  4. The browser draws the page: headings large, paragraphs as blocks of text, links that you can click.

When you type a web address, step 2 happens over the internet. In this course, your files stay on your own computer and your browser opens them from there. The browser reads them in exactly the same way.

HTML, CSS and JavaScript

Most web pages use three languages together:

LanguageIts jobExample
HTMLStructure and meaning: what each part is"This is a heading. This is a list."
CSSAppearance: how each part looks"Headings are blue. The list has no bullets."
JavaScriptBehaviour: what each part does"When someone clicks this button, show a message."

This course is about HTML. You will learn to write HTML that is correct, clear and accessible. Accessible means that people with disabilities can use it too — for example, a person who is blind and uses a screen reader, a program that reads the page aloud. Good HTML also makes CSS and JavaScript much easier to add later.

Try it yourself

  1. Open any website you like, for example a news site. Look for the headings, the paragraphs and the links. You are already reading the structure that HTML describes.
  2. On this lesson page, open the Try code tab on the right edge of the screen (or select the example above and choose Try it). Change the words between <h1> and </h1> and watch the preview change.

Common mistakes

  • Thinking HTML sets colours and layout. That is the job of CSS. If an old tutorial uses HTML for colours, it teaches a method that is no longer used.
  • Thinking you need special software to view a web page. Any browser can open an HTML file. You will do this in the lesson Create, save and open your first page.
  • Expecting to see the tags on the page. The browser hides them. If you ever see <h1> on your page, the file was not opened as a web page. The next lesson explains the usual cause.

Check yourself

  1. What kind of file is a web page?
  2. Which language decides how a page looks: HTML, CSS or JavaScript?
  3. For <p>A warm soup.</p>, what does the browser show?

Answers

  1. A plain text file whose name ends in .html.
  2. CSS.
  3. Only the text "A warm soup." The tags are hidden.

Next: before you write your first page, you need to know how files and folders work on your computer — especially the part of a file name after the dot.

Chat with us on WhatsApp