| Need | Tag |
|---|---|
| Page header / logo | <header> |
| Primary content | <main> |
| Group of content | <section> |
| Navigation links | <nav> |
| Footer | <footer> |
| List of todos | <ul> + <li> |
| User input | <form>, <input>, <label> |
| Click action | <button type="button"> |
.container {
display: flex;
flex-direction: row; /* or column */
gap: 1rem;
align-items: center;
justify-content: space-between;
}.page {
display: grid;
grid-template-columns: 1fr;
gap: 1.5rem;
max-width: 40rem;
margin: 0 auto;
padding: 1rem;
}<label for="todo-input">New todo</label>
<input id="todo-input" type="text" autocomplete="off" />
<button type="button">Add</button>:root {
--bg: #0f172a;
--text: #f8fafc;
--accent: #38bdf8;
}
body {
background: var(--bg);
color: var(--text);
}Teach CSS variables when repeating colors.
- See it in browser (HTML)
- Make it not ugly (spacing, font)
- Make it line up (flex)
- Make it work on phone (viewport + max-width)
Don't introduce grid and flex same lesson unless needed.