Home · Academy · Robotics & Coding · Web Fundamentals · How the Internet and the Web Work

How the Internet and the Web Work

Learn the client–server relationship, the browser's role and how a web page loads.

LESSON COMPASS

What will you use this page for?

Core idea

The internet is a huge network that connects the world's computers, while the web is the system of pages we open in a browser on top of that network — and every time we type an address, a simple request–response journey begins behind the scenes.

Evidence to produce

Complete the page task with your own input, test conditions and reasoning.

Control trap

Thinking the internet and the web are the same The internet is the connection (the roads); the web is one service on that connection (the library). Besides the web, email and games use the internet too. Picturing a single computer when you hear "server" Large sites use not one computer but many servers working…

Next connection

The Skeleton of a Page with HTML: We start building our own page using the building blocks of our first web page — the HTML tags.

Module sources: Python Tutorial · Arduino Learn

LevelBeginner
Age10–16
Duration35–50 min
PrerequisiteBasic computer use; no coding prerequisite
ContentIn-depth guide · 1,848 words
Last updated

One-sentence summary

The internet is a huge network that connects the world's computers, while the web is the system of pages we open in a browser on top of that network — and every time we type an address, a simple request–response journey begins behind the scenes.

Why does it matter?

In this module we will start building our own web pages. But before making something, I like to be curious about how it works. Every day we open a video or visit a site — yet what really happens when we type something into the address bar and press Enter?

Knowing this helps you later. When a page will not load, you can better guess where the problem might be: your computer, the connection or the server. You will also understand why an address starts with https:// and what that has to do with your safety.

This lesson is mostly conceptual: we will not write code, but we will walk through how the internet and the web work, step by step. In the next lesson we build our first HTML page, and today's ideas help us see which world that page lives in.

Short definition: The internet is the network that connects computers, while the web is a service of pages we reach across that network.

The internet and the web are not the same thing

In everyday speech "internet" and "web" are used as if they mean the same thing, but they are different.

The internet is a giant network that links computers all over the world through cables, phone lines and wireless connections. A network is a group of devices that can talk to one another.

The web (its full name is the World Wide Web) is a service that runs on top of that network. The pages, links and images you open in a browser are part of the web.

You can think of it like this: the internet is all the roads in a city. The web is just one of the libraries you reach by using those roads. Other services use the same roads too, such as email, online games and video calls. So the web is one of the services running on the internet, not the only one.

Two examples

Client and server

The web is like a conversation between two sides: one side asks, the other side gives.

The client is the side that asks for something. Your phone, tablet or the browser on your computer is the client.

The server is a powerful computer that stores and sends the pages and files that are asked for. It usually sits in a data centre, staying on at every hour of the day.

A restaurant comparison

The key idea is this: the client sends a request, and the server returns a response. The whole web is built on this request–response cycle.

The browser's role

The browser is the program that runs on the client side. Chrome, Safari and Firefox are all browsers. The browser's job is to:

  1. Take the address you typed.
  2. Send a request to the correct server.
  3. Read the response that comes back (HTML, CSS, images).
  4. Turn all of it into a page you can see on your screen.

So the browser takes the text-based instructions the server sends and turns them into the colourful, clickable page you see.

What happens when you type an address?

Now for the question people are most curious about: what happens when you type something into the address bar and press Enter?

First, let's get to know the URL

The address you type is called a URL (Uniform Resource Locator, meaning "the full address of a resource"). A URL has parts:

https://www.example.com/lessons/web

https://    -> protocol (how to talk)
www.example.com -> domain name (which server)
/lessons/web -> path (which page on that server)

The domain name points to a server with a name that is easy to remember, such as example.com. Computers actually find each other not by name but by number (an IP address). So the first step is turning the name into a number.

The request–response, step by step

The diagram below shows the simplified journey when you type https://www.example.com:

1. You type the address        [Client: browser]
2. The name becomes a number   "who is example.com?" -> IP address
3. The browser sends a request GET /  "please give me this page"
   ------------------------------->  [Server]
4. The server receives it and prepares
5. The server sends a response 200 OK + HTML file
   <-------------------------------
6. The browser reads the HTML and draws the page

These steps happen in milliseconds, but the order is always the same: ask, wait, receive, show. If the page is large (images, video), the browser sends more requests for those extra files.

Two small examples

HTTP and HTTPS

The client and the server talk using a language. That language is called HTTP (HyperText Transfer Protocol). A "protocol" is a set of shared rules that both sides follow. Phrases like GET and 200 OK above are parts of this language.

HTTPS is the secure version of that language. The S at the end stands for "Secure." In HTTPS the data travelling between the client and the server is encrypted. Encryption means turning a message into an unreadable form so that no one can read it along the way.

Why does it matter?

In plain HTTP, the information you send is like open text; someone in the middle could read it. In HTTPS the same information is under a lock. If you see a lock icon in the browser's address bar, it means the connection is protected with HTTPS.

That is why, whenever you are going to type a password, an email or any personal information, it is important to make sure the address starts with https://.

Mini practice

You do not need a computer; this is a thinking and observing exercise.

  1. With an adult, look at the address of a site you use often. Does it start with https://? Can you see the lock icon?
  2. Split the URL below into its parts and write what each part is:

https://www.library.com/books/novel

  1. In your own words, explain the difference between a "client" and a "server" to a friend using the restaurant comparison.
  2. Think about these two activities and say which one is the web and which one is only the internet: (a) watching a film on a video site, (b) playing with a friend in an online game.
  3. Extension: Have you ever run into a "404" page? Why do you think it appears?

Example solution (item 2):

https://        -> protocol
www.library.com -> domain name (server)
/books/novel    -> path (page on that server)

Common mistakes

Thinking the internet and the web are the same

The internet is the connection (the roads); the web is one service on that connection (the library). Besides the web, email and games use the internet too.

Picturing a single computer when you hear "server"

Large sites use not one computer but many servers working together. But the idea is the same: somewhere, a server answers the request.

Treating the HTTPS lock as unimportant

The lock icon is not decoration. If an address does not start with https:// when you are entering personal information, that is a warning sign.

Reading a 404 as "the internet is broken"

A 404 tells you the server is working but could not find that page. Most of the time it comes from a typing mistake in the address.

Safety note

The most important rule when browsing is to protect your personal information. Your name, address, phone number, school and passwords belong to you; do not type them into sites you do not know. Before entering information anywhere, check that the address starts with https:// and look for the lock icon. When you want to sign up for a new site, download a file or click a link, do it together with an adult. Remember: this academy has no real sign-up form and no page that collects data; every example here is only for learning.

Review questions

  1. What roles do a browser, DNS and a web server play when opening a page?
  2. Why is a URL more than only a domain name?
  3. What does HTTPS protect during transport, and what does it not prove?
  4. Why can browser caching show an older version of a site?
  5. How do HTML, CSS and JavaScript contribute different responsibilities?
  6. What evidence helps diagnose whether a failure is DNS, network, server or page code?

Answers

  1. The browser requests and renders resources, DNS maps a name to an address and the server responds with files or generated data.
  2. It can include a scheme, host, port, path, query and fragment, each selecting how and what is requested.
  3. HTTPS encrypts and authenticates the connection to the named site; it does not guarantee that every claim on the site is true or safe.
  4. The browser may reuse stored resources until their cache rules or versioned URLs indicate that a newer copy should be fetched.
  5. HTML gives structure and meaning, CSS controls presentation and layout, and JavaScript adds behaviour and state.
  6. Record the requested URL, DNS result, HTTP status, network log, console errors and whether the same resource opens directly.

Lesson summary

Check your understanding

  1. What is the difference between the internet and the web? Explain with a comparison.
  2. What do the terms client and server mean?
  3. When you type a URL into the address bar and press Enter, what are the first three steps?
  4. In a URL, what do the parts https://, www.example.com and /lessons mean?
  5. What does the "S" in HTTPS stand for, and why does it matter?

Answers

  1. The internet is the network that connects computers to one another (like roads). The web is a service that runs on that network, made of pages we open in a browser (like a library reached using those roads).
  2. The client is the side that asks for something (your browser). The server is the computer that stores and sends the pages that are asked for.
  3. You type the address; its name is turned into a number (an IP); the browser sends a request to the correct server.
  4. https:// is the protocol (how to talk); www.example.com is the domain name (which server); /lessons is the path on that server (which page).
  5. The "S" stands for "Secure"; it encrypts the data between the client and the server so no one can read it along the way. It matters when you enter personal information.

Source and verification note

For “How the Internet and the Web Work”, verification focuses on whether the relationship between The internet and the web are not the same thing and Client and server remains consistent across examples. Examples use standards-oriented HTML, CSS and browser JavaScript. A page should be checked not only visually but also for keyboard use, focus order, mobile layout and meaningful heading structure.

Next lesson

The Skeleton of a Page with HTML: We start building our own page using the building blocks of our first web page — the HTML tags.

Start QuizBack to Web Fundamentals
QUESTION POOL

Reinforce this lesson with 10 questions

This lesson has a pool of 20 questions. Each attempt selects 10 and reshuffles the choices.