How the Web Actually Works
Browsers, servers, DNS, and HTTP — the journey of a web page from request to screen.
What happens when you visit a website
Before writing a single line of code, you should understand the machine you're building for. Every time you type an address and hit enter, a fast, invisible conversation happens across the world in under a second. Understanding it makes everything else click into place.
Your computer is the client. Somewhere else sits a server — a computer whose job is to store a website and hand it out on request. Web development is, at its heart, the art of writing what the server sends and what the browser does with it.
Step one: finding the address with DNS
When you type codaiman.com, your browser doesn't actually know where that lives. Websites are really located by numeric IP addresses like 142.250.x.x. So the browser asks a DNS server — the internet's phone book — "what's the IP address for codaiman.com?" The DNS server replies with the number, and now the browser knows where to send its request.
This lookup is why a brand-new domain sometimes takes a few hours to work everywhere — the world's DNS servers need time to learn the new entry. It's a detail you'll appreciate the first time you launch your own site.
Step two: the request and response (HTTP)
With the address in hand, the browser sends an HTTP request — essentially a polite message saying "please send me your homepage." The server processes it and sends back an HTTP response containing the page's files. This request–response cycle is the fundamental pattern of the entire web; every page load, every form submission, every app action is some version of it.
The response usually arrives in three kinds of files, and they map exactly onto what you'll learn in this course:
- HTML — the structure and content of the page (the skeleton)
- CSS — the styling: colours, fonts, layout (the skin and clothes)
- JavaScript — the behaviour and interactivity (the muscles)
Step three: the browser builds the page
The browser receives the HTML first and reads it top to bottom. When it finds links to CSS and JavaScript files, it fetches those too. Then it assembles everything: it builds a structured model of the page from the HTML, paints it according to the CSS, and runs the JavaScript to make it interactive. This assembled result is what you finally see and click.
This is why understanding the three languages separately matters — each does one job. Mixing up their roles is the most common beginner confusion, so hold onto this: HTML is content, CSS is appearance, JavaScript is behaviour.
Front-end versus back-end
You'll hear these terms constantly, and now you can place them precisely. The front-end is everything that runs in the user's browser — the HTML, CSS, and JavaScript we'll focus on in this course. The back-end is the server side: the program that decides what HTML to send, talks to databases, and handles logins. A full-stack developer works on both.
We're starting with the front-end because it's visual, immediate, and motivating — you'll see your work in the browser instantly. That tight feedback loop is the best way to learn. In the next chapter, we write our first HTML and watch the browser turn it into a real page.
Finished "How the Web Actually Works"?
Mark this chapter complete so you can pick up exactly where you left off. Your progress saves locally — sign in to sync across devices.
Was this chapter clear?
