Skip to content
AITermsLab
–points–day streak

What are files and folders in a project?

A file holds one piece of a project, like a page or a picture. A folder groups related files, so a project's code stays organised and easy to find.

Last updated

In real life

Like a filing cabinet: each document is a file, and the labelled drawers and dividers are folders.

Try it yourself

The demo shows a made-up bakery website's project: an index.html page, an about.html page, a styles folder with style.css and an images folder with two pictures. Click any file to see its path and what it's for.

Files and folders

This lesson

rosas-bakery/

  • styles/

  • images/

Click a file to see its path and what it's for.

Terminal (pretend, safe to try)

rosas-bakery $

Run a command

A project is files inside folders. The path, like images/logo.png, is the route through the folders to a file. Code uses paths to find other files.

File vs folder

A file holds content, like code or a photo. A folder holds files and other folders. A path like images/logo.png says how to reach a file.

Common questions

What does the dot in style.css mean?

The part after the dot is the file extension. It says what kind of file it is: .html for a web page, .css for styles, .png or .jpg for pictures.

Why do project folders matter?

Code finds other files by their path. Move or rename a file without updating the code that points to it, and that link breaks.

Where you will use this

Quick check: File and folder

Question 1 of 3

What does a folder do?

What does a folder do?