Skip to content
Lesson 1 of 9 Free Preview
Duration: 15 min

How Web Pages Work

Learn it

Every web page is made of HTML, which describes the content (headings, paragraphs, pictures). CSS describes how it looks (colours, sizes, layout). Your browser reads them and draws the page.

HTML uses tags in angle brackets. Most come in pairs: <p> opens and </p> closes.

🧰 Tool: a free online editor such as CodePen or JSFiddle, or a plain text editor and your web browser.

Code examples

HTML

<!DOCTYPE html>
<html>
  <head>
    <title>My First Page</title>
  </head>
  <body>
    <h1>Hello, web!</h1>
    <p>This is my very first web page.</p>
  </body>
</html>

The head holds information about the page; the body holds what you see.

Project: First page

  1. Open CodePen (or a text editor, saving as index.html).
  2. Type the example.
  3. Change the heading and paragraph to be about you (nickname only).
  4. Look at the result.

Challenge: Right-click any web page and choose ‘View page source’ to peek at its HTML.

Enjoying this lesson?

Enroll in the full course to access all lessons, track your progress, and earn a certificate.

Enroll in Full Course