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.
| Helper | Its job | It's like⦠|
|---|---|---|
| HTML | Says what each part is: a title, some words, a picture, a button | 𦴠The bones of a body |
| CSS | Says how each part looks: colors, sizes, where things go | π¨ Paint and clothes |
| JavaScript | Makes 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.
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.
<h1>My amazing page</h1>
<p>Hello! This page is made of blocks.</p>
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
- Change the words in the big title so it says hello from you.
- 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.
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. βΊ
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.