Lesson 1 Β· Make a web page

What is a web page?

Find out what a web page is made of by building one out of blocks.

About 10 minutes

Tab indents. Press Escape, then Tab, to leave the editor.

You look at web pages all the time: games, videos, stories, maps. But what is a web page, really? In this lesson you'll find out what a page is made of, and you'll build one yourself out of blocks. 🧱

A web page is a list of instructions

A web page is a file full of words and little instructions. The instructions say things like "this is a big title" or "this is a button".

A browser is the app that reads those instructions and draws the page on your screen. Chrome, Safari, Firefox and Edge are all browsers. πŸ–₯️

Think of a recipe. The recipe is just words on paper. The cook reads it and makes the cake. πŸŽ‚ The web page is the recipe, and the browser is the cook.

Three helpers make every page

Almost every web page is made by three helpers working together. Each one has its own job.

HelperIts jobIt's like…
HTMLSays what each part is: a title, some words, a picture, a button🦴 The bones of a body
CSSSays how each part looks: colors, sizes, where things go🎨 Paint and clothes
JavaScriptMakes things happen when you click, tap or type🧠 The brain

A page with only HTML works, but it looks plain. CSS makes it pretty. JavaScript makes it do things. You'll meet all three in this path, one at a time.

Question

Quick check

You want your page's title to be purple. Which helper does that job?
Pick an answer.

Build a page out of blocks

Time to build! Each block below is one piece of a web page. Click a block to add it to your page. You'll see two things side by side:

  • the HTML the block makes (the instructions), and
  • the page the browser draws from those instructions.

Try adding a big title, some words and a button. Change the words in each block to say anything you like. Move blocks up and down to change the order.

Lab

Build a page from blocks

Every block is a tag. Add blocks, change their words, and watch the page and its HTML change together.

  1. <h1>My amazing page</h1>
  2. <p>Hello! This page is made of blocks.</p>
Your page

My amazing page

Hello! This page is made of blocks.

On a real website, a picture is an image file. The file names here are pretend.

Did you spot the words in pointy brackets, like <h1> and <p>? Those are called tags. A tag is a label that tells the browser what a piece of the page is. You'll learn all about tags in the next lesson.

Your first real web page

Now let's change some real HTML. The box on the left is the code. The box on the right is the page the browser draws from it. When you change the code, the page changes too. ✨

Challenge

Say hello to the world

  1. Change the words in the big title so it says hello from you.
  2. Change the sentence underneath. Put at least one emoji in it, like 🐱 or πŸ•.

Only change the words between the tags. Leave the <h1> and <p> parts as they are.

  • Your big title says something new
  • Your sentence has an emoji in it

You just wrote a web page. Every website you have ever seen started with words in tags, just like yours. πŸŽ‰

Where do web pages come from?

When you open a website, the page usually isn't on your computer yet. It lives on a server. A server is a computer that keeps web pages and sends them to anyone who asks, a bit like a library that lends out books. πŸ“š

The internet is the giant web of wires and radio signals that connects your computer to servers all over the world. Step through the journey below to see a page travel to you.

Lab

How a web page reaches you

Step through the journey. The diagram lights up the parts involved in each step.

an addressYouBrowserthe appInternetcables, Wi-Fi, radioServera computer, always on

You ask for a page

You type an address like offlineowl.com, or tap a link. Your browser (the app you look at web pages with) gets your request.

Some pages can also be saved on your device, so they keep working even when the internet is off. That's handy on a camping trip or when the power is out. β›Ί

Question

Quick check

What is a server?
Pick an answer.

What you learned

  • A web page is a file of words and instructions, and a browser reads it and draws it.
  • HTML says what things are, CSS says how they look, and JavaScript makes them do things.
  • Tags like <h1> and <p> are labels that tell the browser what each part is.
  • Pages live on servers and travel to you over the internet.
  • You built a page out of blocks and wrote your first real HTML! πŸ†

Finished this lesson?

Mark it complete to track your progress on this device.

Next: Tags are labels