Plate 0.2 · Phase 0 — Ground Floor · 15 minutes
The three languages of every web page
Every website you have ever used is made of exactly three things. Being able to say instantly which of the three is misbehaving is the fastest debugging skill in the trade — and you can have it in fifteen minutes.
Warm-up · from Module 0.1You edited a headline in DevTools, then reloaded. Why did your change vanish? Answer in your head, then tap to check.
You only changed the copy that was delivered to your own browser. Reloading asked the server for a fresh copy — the server never knew your edit existed.
Why classifying beats fixing
When a professional sees something wrong on a page, their first move is not to fix it. It is to put it in a bucket. There are only three buckets, and whichever one the problem lands in tells them which file to open and which half of their knowledge to use.
Beginners skip this step. They see a broken page, feel a wave of panic, and start changing things in whichever file happens to be open. An hour later they've edited the wrong file in four places. This module is the antidote, and it's the shortest one in the manual.
One body, three systems
Picture a person standing in front of you.
The body you already understand
- The skeleton
- What exists, and how it's connected — head on top, arm attached at the shoulder. Take it away and everything else becomes a puddle on the floor.
- The clothes and grooming
- Color, fit, proportion, what's right for a beach and what's right for a courtroom. Take it away and the person still works. They're just plain.
- The muscles and nerves
- Reacting. Someone calls your name, you turn your head. Take it away and the person is still there, still dressed — but nothing responds.
The web page you are learning to build
- HTML — the structure
- What is on the page and how it nests: this is a heading, this is a paragraph, this button sits inside this form. What things are.
- CSS — the appearance
- Color, spacing, typography, layout, and how all of it rearranges on a phone versus a monitor. What things look like.
- JavaScript — the behavior
- Click, type, submit, drag, update without reloading, fetch new data. What things do.
You can have a skeleton with no clothes. You cannot have clothes with no skeleton. That is the entire reason Phase 1 of this manual is HTML and Phase 2 is CSS — not tradition, not snobbery. Styling is instructions about things, so the things have to exist first.
Watch the layers come off
Below is a real product card — the same kind of component you'll build yourself in Phase 2 and bring to life in Phase 4. Flip the switches and watch what survives. Nothing here is a picture; it's a live thing being stripped.
Cart: 0 items
One product card, three layers. The card holds a photo, the name "Smoked Brisket Sandwich", the price $14.50, a short description, a quantity stepper, an Add to cart control and a link to the full menu.
| CSS | JavaScript | What you get |
|---|---|---|
| On | On | A polished card. Quantity changes and Add to cart updates the cart count. |
| Off | On | Every word, the price, the image and the link are all still there, in the browser's default look. The controls still work. Roughly what a screen reader hears. |
| On | Off | It still looks perfect, and it is completely dead. The controls are real, but nothing is listening. |
| Off | Off | HTML alone: the flat-pack box from Module 0.1. Plain, but a working, readable page. |
Remove CSS and you lose appearance. Remove JavaScript and you lose behavior. Remove HTML and nothing is left.
Three things are worth noticing while you play with that.
With CSS off, nothing is lost. Every word, every price, every link is still there — just plain, stacked, with the browser's own default look from 1995. This is roughly what a screen reader hears and what a search engine reads. If your page makes no sense in this state, it makes no sense to a blind user or to Google either.
With JavaScript off, everything looks perfect and nothing works. That gap — beautiful and dead — is one of the most common bug reports you will ever receive, and it always points at the same bucket.
With both off, you're looking at the raw delivery. That's the flat-pack box from Module 0.1, before assembly.
The three, side by side
| HTML | CSS | JavaScript | |
|---|---|---|---|
| Answers | What is it? | What does it look like? | What does it do? |
| File ends in | .html | .css | .js |
| It is a… | markup language — a labeling system | stylesheet language — a rulebook | a general-purpose programming language |
| A line of it | <button>Add to cart</button> | button { background: teal; } | if (stock > 0) addToCart() |
| Remove it and… | there is no page at all | a plain but fully working page | a page that can't react to anyone |
| You learn it in | Phase 1 | Phase 2 | Phases 3 and 4 |
That third row matters more than it looks. HTML and CSS are not general-purpose programming languages, and saying so is not an insult — it's a description. You can't use either one to store a customer's order, add up a basket, or decide what to do next. HTML labels things; CSS states rules about things (and CSS can do some clever calculations for layout). JavaScript is the only one of the three that can remember, decide and repeat.
People say "I'm learning to code" and mean HTML. Then they hit JavaScript in month two, discover it's a genuinely different kind of thinking, and conclude they're not smart enough. They're not encountering a wall; they're encountering a different subject. Phase 3 exists precisely because that transition deserves twelve unhurried sittings of its own.
How the three find each other
The HTML file is the boss. It's the one the browser asks for in step 3 of the round trip, and it invites the other two in by name:
<link rel="stylesheet" href="styles.css"> <script src="app.js" defer></script>
Think of the HTML file as the house's address. Those two lines are the notes it leaves out front: decorator, let yourself in, and electrician, come after the decorator. You'll write both lines by hand in Module 1.1 and they will then be muscle memory forever.
Order is real, and it's the source of an entire genre of beginner bug. The browser reads the HTML from top to bottom, applies the CSS as it goes, and runs the JavaScript when it reaches it. If your script runs before the button it's looking for has been created, the script finds nothing and stops — the page shows no sign of it, and the only clue is a red error in the Console. That word defer above means "wait until the HTML is finished." Remember that it exists; Module 4.1 explains why.
Whose fault is it? — the triage drill
This is the module's whole point, so do it properly. Read each symptom, decide the bucket, then commit to an answer before reading the reasoning.
Do this now — 4 minutes on a real website
You did the DevTools warm-up in 0.1. This time you're going to take a real, professionally built site apart in front of your own eyes. Use a laptop or desktop.
- Open a site you use often. Open DevTools (F12, or Cmd+Option+I on Mac) and go to the Elements tab.
- Go to wikipedia.org and open any article. Near the top of the Elements tab, inside
<head>, find a line starting with<link rel="stylesheet". Click it once to select it, then press Delete. The clothes come off. Sit with how much of the site still works. (Many big sites hide their styles inside the page instead, so deleting one line changes nothing there — that's why we use Wikipedia.) - Reload to put them back on.
- Now, with DevTools still open, press F1 to open DevTools settings (or click the gear icon), tick Disable JavaScript, and reload the page. Go back to a site you use often for this step — one with menus, search and carousels.
- Try the things a page does rather than shows: the search box, the hamburger menu, an image carousel, an "add to cart" button, an infinite-scroll feed. Note which ones died.
- Untick it. Then write one sentence: on this site, CSS was responsible for ___ and JavaScript was responsible for ___. If you can fill that in, you have this module.
Three things beginners get wrong
1. "JavaScript is a version of Java." It is not, and they are unrelated. The name was a marketing decision in 1995 when Java was fashionable. The classic line: Java and JavaScript are related the way a car and a carpet are. Don't buy a Java book by mistake — people do, every year.
2. "I should learn all three at once so I can build something real." A page with only HTML is something real — it loads in every browser on earth, works offline, and is fully readable. Build three plain ones before you touch CSS. It will feel too simple. That feeling is the whole point: you'll be adding one layer to something that already works instead of debugging three unknowns at once.
3. "CSS is the easy one." HTML is genuinely learnable in a couple of weeks. CSS is where working professionals lose the most hours — layout, responsiveness, and one style rule quietly overriding another. Phase 2 gets ten modules for a reason.
Words you now own
- markup
- Text with labels wrapped around it to say what each part is. HTML is markup.
- element
- One labeled thing on the page — a heading, an image, a button.
- tag
- The label itself, in angle brackets:
<p>opens,</p>closes. - attribute
- Extra information on a tag, like
hrefon a link orsrcon an image. - stylesheet
- A file of CSS rules, usually shared by every page on a site.
- selector
- The part of a CSS rule that says which elements it applies to.
- script
- A file of JavaScript, and the tag that loads it.
- defer
- An instruction telling a script to wait until the HTML has finished loading.
Six questions. Four correct to move on.
Three buckets, in one breath: HTML is what's there, CSS is how it looks, JavaScript is what it does. Then name one thing on your favorite website that belongs in each bucket. If that comes easily, you're ready for 0.3.