Build the HTML and CSS foundation
Build semantic pages, responsive layout, design tokens, and static core states.
- Difficulty
- beginner
- Time
- 60 minutes
- Last verified
- 9/21/2026
What you will build
Build semantic pages, responsive layout, design tokens, and static core states.
Understand the idea first
Build semantic pages, responsive layout, design tokens, and static core states.
Build it step by step
app/
├─ index.html
├─ css/{tokens,base,components,layout}.css
├─ js/app.js
└─ assets/- Open the previous project and record its result.
- Type the example and complete: Represent empty, normal, and error states in HTML, then style three widths.
- Change one input, predict, then verify.
- Create and repair: Skipping static states makes structure and logic fail together.
Read the important lines
- Build semantic pages, responsive layout, design tokens, and static core states.
- Read input, processing, and output separately.
- Verify another input and an edge case.
Common mistakes and what to check
| Symptom | What to check |
|---|---|
| Unexpected result | Skipping static states makes structure and logic fail together. |
| Nothing changes | Save, verify paths, and read the first relevant Console error. |
Practice without copying
Represent empty, normal, and error states in HTML, then style three widths.
Check the answer after you try
Rebuild and explain the decisions. Check: Skipping static states makes structure and logic fail together.
Completion check
- I produced the required visible result
- I can explain the input, processing, and output
- I tested normal, edge, and failure cases