Plate 0.3 · Phase 0 — Ground Floor · 20 minutes
Files, folders and the developer's filing cabinet
This is the least glamorous module in the manual and one of the two or three most useful. Almost every "my image won't show up" and "my styles aren't loading" in your first six months will be a problem from this page.
Warm-up · from Module 0.2A button looks perfect but does nothing when clicked. Which of the three languages do you suspect first?
JavaScript — the behavior layer. It looks right (so CSS is fine) and it exists (so HTML is fine); only the part that reacts is failing.
Why a whole module on filenames
In Module 0.2 you saw an HTML file invite in a stylesheet and a script by name. That name is an address. If the address is wrong by one character — a capital letter, a space, a missing folder — the browser goes looking, finds nothing, and says nothing about it. Your page just quietly appears broken.
Two skills fix that permanently: knowing how to write an address from where you're standing, and naming things so the address is never ambiguous in the first place. Twenty minutes, and you will never lose an afternoon to it.
Giving directions to a file
Suppose a friend asks where the pharmacy is. You have two honest ways to answer.
Two ways to give directions
- The full postal address
- "1425 Chestnut Street, Philadelphia, PA." Works from anywhere on earth. Long, and useless if the whole neighborhood moves.
- Directions from where you stand
- "Two doors down on the left." Short and natural — but only true from this exact spot.
- "Go back to the road first"
- If you're inside a building, you step out to the street before you can go anywhere else.
Ways to write a path
- Full URL (absolute)
https://site.com/images/logo.svg. The complete address — works from anywhere. Use it for links to other sites.- Relative path
images/logo.svg. Starts from the folder the current file is sitting in. Shorter, and what you'll write almost all the time.- The
..step ../images/logo.svgmeans "go up one folder, then down into images". Two dots is the whole trick. (One dot,./, means "this folder" —./images/logo.svgis the same asimages/logo.svg.)
A relative path is relative to the file it is written in — not to the page the visitor is looking at. So a path inside css/styles.css counts from inside the css folder, even though the visitor is on index.html. This single fact is behind an enormous share of missing background images, and it's the first thing to check when one goes missing.
A path that starts with a single slash — /images/logo.svg — counts from the top of the website. That works once your site is served by a web server (Live Preview in Module 0.4, or a real host), but it breaks when you double-click a file to open it, because then "the top" means the top of your whole hard drive. Stick to relative paths until Phase 6, where frameworks use root-relative ones for you.
Work it out yourself
Here is an ordinary small project. Pick the file you're writing in, pick the file you want to reach, and the correct path appears — with the reasoning, so you can do it in your head next time.
portfolio/
├─ index.html the home page
├─ about.html
├─ css/
│ └─ styles.css
├─ js/
│ └─ app.js
└─ images/
├─ logo.svg
└─ photos/
└─ hero.jpg
You are writing in
You want to reach
Path finder. A project holds these files: index.html, about.html, css/styles.css, js/app.js, images/logo.svg and images/photos/hero.jpg. Start from the file you are writing in, and go to the one you want.
| Writing in | Want to reach | Write | Why |
|---|---|---|---|
index.html | about.html | about.html | Same folder: just the file name. |
index.html | css/styles.css | css/styles.css | Go down into css. |
index.html | images/photos/hero.jpg | images/photos/hero.jpg | Go down two levels. |
css/styles.css | index.html | ../index.html | Step up one level with ... |
css/styles.css | images/logo.svg | ../images/logo.svg | Up one level, then down into images. |
js/app.js | css/styles.css | ../css/styles.css | Up one level, then down into css. |
<link rel="stylesheet" href="css/styles.css"> <a href="../index.html">Read more</a> background-image: url(../images/logo.svg);
Files in the top folder never need dots. Files inside a folder start with .. to climb out first.
Notice what happens when you write from css/styles.css to images/logo.svg: you have to step up and out of css first. That leading ../ is not decoration — remove it and the browser hunts for portfolio/css/images/logo.svg, a folder that has never existed.
Naming things so they never bite you
Six rules. They look fussy. Every one of them exists because of a bug that cost somebody a working day.
| Rule | Why it exists | Instead of | Write |
|---|---|---|---|
| No spaces | URLs can't carry spaces; they get mangled into %20 and links break in email and chat. | my photo.jpg | my-photo.jpg |
| All lowercase | Your laptop doesn't care about capitals. Most real web servers do. Works locally, 404s live. | Hero.JPG | hero.jpg |
| Hyphens, not underscores | Search engines read a hyphen as a word break; an underscore glues words together. | about_our_team.html | about-our-team.html |
| Plain characters only | #, ? and & mean something specific in a URL. Accented letters and ñ get re-encoded. | o’brien & sons.html | obrien-and-sons.html |
| Dates as YYYY-MM-DD | It's the only format that sorts correctly by name — and it can't be misread: 3-8-26 is March 8 to an American and 3 August to a European. | report-3-8-26.pdf | report-2026-08-03.pdf |
| Say what it is | You will meet this file again in a year with no memory of today. | final2-NEW-v3.css | pricing-table.css |
Type any filename below — one of your own from your Downloads folder is a good test — and see what a professional would flag.
Filename checker. Seven rules: has a name; ends in a real extension; no spaces; all lowercase; plain characters only (no brackets, &, #, ?, accents); hyphens rather than underscores; says what it is (not final, new, copy or v2).
| Filename | Breaks | Suggested |
|---|---|---|
My Vacation Photo (Final) 2.JPG | spaces, capitals, brackets, "final" | my-vacation-photo-2.jpg |
Café_Menu&Prices.PDF | capitals, accent, &, underscore | cafe-menu-and-prices.pdf |
Hero.jpg | capital H | hero.jpg |
notes | no extension | notes.txt (add one) |
jennet-hero-banner.jpg | nothing | jennet-hero-banner.jpg |
A spaced name becomes %20 in links, and Hero.jpg and hero.jpg are different files on most servers.
The shape of a project
Every small site you build in Phases 1 and 2 will look like the tree above, and there is nothing arbitrary about it: one folder per kind of thing, and one HTML file per page, all sitting at the top where they're easy to find.
Two conventions inside that shape are worth memorizing now.
index.html is a magic name. When a visitor asks for a folder rather than a file — yoursite.com/ or yoursite.com/blog/ — the server looks inside and serves index.html without being told. That's why home pages are called index. Name it home.html and your site's front door stops working.
One project, one folder. Everything a site needs lives inside a single top folder, and nothing outside it is ever referenced. That's what makes a project something you can zip up, hand over, put in version control (Module 5.2) or upload to a host (Module 5.6) and have it just work.
Make one folder for all of it — Documents/projects/ is fine — and put every project inside it as its own folder. Not the Desktop, not Downloads, not scattered across three cloud drives. The single biggest cause of lost beginner work is not deleting a file; it's saving it somewhere that made sense at 11pm and never again.
Three things beginners get wrong
1. Hidden file extensions. Windows hides known extensions by default, so you save "index.html" in Notepad and actually get index.html.txt — which the browser shows as text instead of a page. Turn extensions on today. Windows 11: File Explorer → View → Show → File name extensions. Windows 10: File Explorer → View → tick File name extensions. Mac: Finder → Settings → Advanced → Show all filename extensions. Do it before Module 1.1.
2. Absolute paths from your own computer. Something like C:\Users\Jaybee\Desktop\site\logo.png will display perfectly on your screen and on nobody else's. If a path contains your name or a drive letter, it is wrong.
3. Renaming files after linking them. Nothing updates automatically. Rename hero.jpg to hero-2.jpg and every reference to it goes stale in silence. Rename deliberately, then search your project for the old name — a habit your editor makes easy in Module 0.4.
Words you now own
- directory
- The formal word for a folder. Same thing.
- path
- The written address of a file: folders separated by
/. - relative path
- Counted from the file you're writing in.
- absolute URL
- A complete address starting with
https://— works from anywhere. - root-relative path
- Starts with
/, counted from the top of the website. Needs a web server; breaks on a double-clicked file. - parent —
.. - One folder up.
../at the start of a path means "step out first". - extension
- The bit after the last dot. It tells software what kind of file this is.
- index.html
- The file a server serves when someone asks for a folder.
Make the cabinet. About fifteen minutes, on your own machine.
What you should see — and the answers
Your folders
Documents/
└─ projects/
└─ portfolio/
├─ css/
├─ images/
│ └─ harbor-sunset.jpg ← your photo, renamed
└─ js/
The two paths, for a photo called harbor-sunset.jpg
From index.html (which will sit directly inside portfolio): images/harbor-sunset.jpg
From css/styles.css: ../images/harbor-sunset.jpg — out of css first, then into images.
If something's off
- Folder names show capitals or spaces? Right-click → Rename.
portfolio,css,js,images— all lowercase. - Can't see
.jpgon the end of your photo? File extensions are still hidden — redo the first step.
Six questions. Four correct to move on.
"A path is directions from the file I'm writing in. Two dots means go up a folder. Filenames are lowercase, hyphenated, no spaces." If that's automatic, you've removed an entire category of future frustration — and your portfolio folder is sitting there ready for Module 1.1.