How the Web Works

💻 Computer Science Years 6–10 Foundation

The web versus the internet, URLs and DNS, the client-server request-response cycle, and the difference between HTTP and secure HTTPS.

Open this lesson, with practice and a printable worksheet →

You type a few words into your browser, press Enter, and a fraction of a second later a full page of pictures, text and buttons appears. That felt instant, but underneath a small conversation just took place between your computer and a machine that might be on the other side of the planet. Learn that conversation and the web stops being magic.

Why this matters: Every site you have ever used works the same way — a name is looked up, a request is sent, a response comes back. Understanding this explains why some pages are slow, what the padlock really means, and why "the web" and "the internet" are not the same thing at all.
1. type URL triomatic.co.uk 2. DNS lookup name → IP 3. request to server IP 4. response page back
Type a name → DNS finds the IP → a request is sent → the page comes back.

The web sits on top of the internet

The internet is the huge physical network — the cables, routers, phone masts and satellites that connect the world's computers. The web (the World Wide Web) is just one thing that uses that network: the enormous collection of linked pages and sites you view in a browser. Think of the internet as the roads, and the web as the shops and houses you visit by driving on them. Email, video calls and online games also travel the internet, but they are not part of the web.

the WEB (pages & sites) the INTERNET (the network underneath)
The web is a layer of pages resting on top of the internet's network.

URLs, DNS and IP addresses

Every page has an address called a URL (Uniform Resource Locator), such as https://triomatic.co.uk/maths. People remember names, but computers find each other using numeric IP addresses. The DNS (Domain Name System) is the web's phone book: it takes the name you typed and returns the matching IP address, so your request knows exactly where to go.

Client, server, request and response

CLIENT browser SERVER holds the site request ("send me the page") response (the HTML page)
The client asks (request); the server answers (response).

Your browser is the client: it sends a request asking for a page. The computer that stores the site is the server: it sends back a response containing the page's code. The browser then renders that code — turning the HTML into the headings, images and buttons you see. This request–response pattern is the heartbeat of the whole web.

HTTP and HTTPS

http:// (open) readable by anyone https:// secure encrypted — padlock
HTTPS adds a padlock: the data is encrypted, so eavesdroppers see nonsense.

HTTP (HyperText Transfer Protocol) is the set of rules the client and server follow to swap pages. HTTPS is the same but secure — the data is encrypted, shown by the padlock in the address bar, so passwords and card details can't be read if intercepted.

TermWhat it is
URLThe address of a page, e.g. https://triomatic.co.uk
DNSTurns a name into the server's IP address
ClientThe browser that sends the request
ServerThe computer that sends back the response (page)
HTTPSSecure, encrypted version of HTTP (padlock)
Worked scenario: You type https://bbc.co.uk and press Enter. (1) DNS looks up the name and returns the server's IP address. (2) Your browser (the client) sends an HTTPS request to that IP. (3) The server responds with the page's HTML. (4) Because it's HTTPS the traffic is encrypted, and (5) your browser renders the HTML into the page you see.
Common mistake: Saying "the web" and "the internet" mean the same thing. The internet is the network of connected computers; the web is the pages and sites that ride on it. Email and video calls use the internet too, but are not the web.

Tip: Before typing a password or card number, look for https and the padlock. Plain http sends everything as readable text that anyone on the network could capture.

Get the printable worksheet →
← Big Data & Data Science → HTML & CSS Basics
← Sasta Basta home All subjects