learn.web Back to the curriculum ↗

First steps on the web / 01

How the web works

Follow a request from URL to pixels: DNS, HTTP, servers, and the three languages of the web.

Time
45 min
Mode
Learn → Make → Check
Path
Web Foundations

By the end, you can…

A page is a journey, not a file

When you type a URL and press Enter, your browser asks a directory system (DNS) where the site's server lives, opens a connection, sends an HTTP request, and receives a response containing the page. The browser then turns that response into pixels.

HTML provides the structure, CSS the appearance, and JavaScript the behavior. They travel together in the response, and each has a clear job. Knowing which job is which is the foundation of building for the web.

Follow one request with your own eyes

Open the Network panel, reload a page, and find the document request—usually the first row, the same URL you typed. Its status code tells you what happened: 200 means success, 301 a redirect, 404 a missing page.

Click the row to see the response body: the HTML is right there, plain text your browser interpreted into a page. That is the whole trick of the web—it is open and inspectable by design.

Working example
curl -I https://learnweb.cc

HTTP/2 200
content-type: text/html

Your studio task

Make — Map one page-load journey in plain language, from URL to pixels.

  1. Type a URL and open DevTools before reloading.
  2. Find the document request in the Network panel.
  3. Note its status code, size, and load time.
  4. Explain to someone what each step did.
Definition of done

Your notes name DNS, a request and response, HTML parsing, and one real network resource with its status code.

Open the interactive lesson with its workspace ↗

Knowledge check

What does DNS do when you enter a URL?
  1. Guarantees the page loads faster
  2. Resolves the domain name into a server address
  3. Styles the page
Reveal answer (B)

DNS translates a name people can remember into an address a browser can reach.

A page returns status 404. What does it mean?
  1. The page was not found
  2. The server is unreachable
  3. The page is forbidden
Reveal answer (A)

404 means the requested resource does not exist at that address.