Create a small, predictable workspace for static web pages.
- Files and folders
- index.html
- relative paths
- editor formatting
- browser refresh
Create a site folder with index.html and assets directories, then open it in a browser.
- 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.
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.
An absolute filesystem path such as /home/... will usually work only on your computer. Use relative URLs for project files.
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.
- 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.
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.