Study
CSC-212 route
Unit 1 · Lesson 1 of 3 15 min

How the Web Works

Follow one tap from your phone to a server and back, and the whole web will make sense.

It is 2 a.m. in the week results are released. You type your registration number into the portal, tap CHECK RESULT, and hold your breath. Your score appears. Between your tap and that number, a message crossed the country and back — this lesson follows it.

The Client and the Server

Two computers do all the work of the web, and yours is one of them. A client is the program, usually a web browser, that requests pages. Your phone's browser, your laptop's browser — each is a client, always asking.

A server is a computer that stores websites and sends pages back when asked. It sits in a data centre somewhere, day and night, doing nothing but waiting for requests and answering them. No screen, no keyboard, no patience required.

The two talk to each other in HTTP. HTTP is the set of rules that browsers and servers use to exchange pages, and HTTPS is HTTP wrapped in TLS encryption so nobody on the network can read or tamper with the traffic in transit. Your tap becomes an HTTP request ("send me the result page for this registration number"); the server replies with an HTTP response (the page itself, plus its styles and scripts, stamped with a status code such as 200 OK or 404 Not Found). One request, one response, thousands of times a day.

Browser the client HTTPS request Server answers requests HTTPS response one request, one response
Client-server communication: the browser sends an HTTP request and the server returns a response.

Front-End and Back-End

The front end is the part of a website that runs in the browser: everything the user sees and touches. Buttons, colours, menus, the score on your result page — all front end, built with three languages you will master in this course: HTML, CSS and JavaScript.

The back end is the part that runs on the server: the programs, the logic and the database. Checking your registration number, fetching your score from thousands of records, deciding you may see it — all back end, built with languages like PHP, Python or JavaScript on Node.js, plus databases like MySQL. Developers who build both sides are called full-stack developers.

Comparison of Front-End and Back-End
Front-EndBack-End
Where it runsIn the browser, on your deviceOn the server, far away
Built withHTML, CSS, JavaScriptPHP, Python, Node.js, databases
Responsible forWhat you see and touchData, logic and decisions
You notice it whenA page looks good and respondsYour login works and records are safe
Front-End runs in the browser HTML · CSS · JS layout, styles, clicks HTTPS Back-End runs on the server Node · Python · PHP auth, rules, APIs SQL Database persistent store MySQL · Postgres users, scores, fees
How front-end, back-end and database collaborate across a single portal request.

Roles of HTML, CSS and JavaScript

Think of a person. The skeleton gives shape, the clothes give style, and the muscles respond when spoken to. A web page has the same three layers, and this course teaches all three.

HTML describes the structure of a page. It says: here is a heading, here is a paragraph, here is a button. CSS describes the appearance of a page. It says: make that heading green, centre that button, give the page breathing room. JavaScript describes the behaviour of a page. It says: when the button is clicked, check the form and show the result without reloading.

Notice the order: structure first, then beauty, then behaviour. You cannot style a button that does not exist, and you cannot program a click on it until it is there. That is the order of this course too.

Tools for Building Websites

A web developer needs only a handful of tools, and every one of them is free:

  • Code editor. Where you write HTML, CSS and JavaScript. Visual Studio Code is the popular choice: colours your code, catches mistakes, and suggests completions as you type.
  • Web browser. Your first testing ground. Chrome, Firefox, Edge — any modern browser runs your pages exactly as your users will see them.
  • Developer tools. Built into every browser (right-click, then Inspect). They show the page's code, let you edit it live, and reveal errors in your scripts.
  • Version control (Git). A time machine for your code. It records every change so you can rewind mistakes and collaborate without overwriting each other's work.
  • Validators. Online checkers that read your HTML and CSS and point out errors the browser silently forgives but you should still fix.
  • Frameworks and libraries. Ready-made collections like Bootstrap 5 that give you professional styling and behaviour without writing everything from scratch.

Pause & think

Your bank app shows the wrong balance, but the same account on your friend's phone shows the correct one. Is the fault in the front end or the back end?

The browser is a translator: it turns HTML, CSS and JavaScript into the page you see and touch.

📌 If you remember nothing else…

  • The client (browser) sends HTTP requests; the server answers with HTTP responses.
  • The front end runs in the browser (HTML, CSS, JavaScript); the back end runs on the server (logic and databases).
  • HTML gives structure, CSS gives appearance, JavaScript gives behaviour — in that order.
  • A developer's toolkit: editor, browser, developer tools, Git, validators and frameworks.
  • The web began with one proposal at CERN in 1989 — and it was given away free.

Quick check

Did it land?

1. You tap CHECK RESULT on a portal. What does your browser do first?
2. A login page shows a form, then checks your password against stored records. Which side does each job?

Spotted a mistake?