Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.65 KB

README.md

File metadata and controls

53 lines (35 loc) · 1.65 KB

02. Project setup and editor

Create a small, predictable workspace for static web pages.

Learn

  • Files and folders
  • index.html
  • relative paths
  • editor formatting
  • browser refresh

Build

Create a site folder with index.html and assets directories, then open it in a browser.

Check your work

  • Open the result in a browser and inspect the HTML and computed CSS.
  • Test at narrow and wide widths and use the keyboard for interactive elements.
  • Write down one thing you changed after testing.

Deep lesson

How it works

Keep each small project self-contained: an index.html entry page, a stylesheet, and an assets directory. Relative paths such as assets/photo.svg depend on the location of the current file. Organizing files early prevents path mistakes later and makes static deployment easier. Choose descriptive lowercase names and use your editor's formatter so indentation reveals nesting.

Common mistake

An absolute filesystem path such as /home/... will usually work only on your computer. Use relative URLs for project files.

Guided challenge

Create a fresh practice site with index.html, css/style.css, and images/scene.svg. Link the stylesheet and image, move the page into a pages/ directory, then correct both relative URLs.

Completion check

  • Rebuild the core idea without copying the example line by line.
  • Explain the key HTML or CSS choice in your own words.
  • Test the result at a narrow width and with keyboard navigation where relevant.

Run the example

Open example.html in a browser. Edit style.css, save, and refresh.

Try: Add an assets folder and reference an image with a relative path.