CSS tutorial
Colors, spacing and layout. Make your HTML look the way you want.
10 lessons
- What is CSS?(completed)
CSS controls how HTML looks. Learn what a CSS rule is made of and where to put it.
Practice: 3 exercises and 3-question quiz
- CSS selectors(completed)
Target elements by name, by class or by id, and learn when to use each one.
Practice: 3 exercises and 4-question quiz
- The box model(completed)
Every element is a box. Understand content, padding, border and margin, and how they add up.
Practice: 3 exercises and 3-question quiz
- Colors and backgrounds(completed)
Set text and background colors with names, hex codes and rgb(), and add gradients.
Practice: 3 exercises and 3-question quiz
- Text and fonts(completed)
Control font family, size, weight, line spacing and alignment.
Practice: 3 exercises and 3-question quiz
- The display property(completed)
Switch elements between block, inline, inline-block and none.
Practice: 2 exercises and 3-question quiz
- Flexbox(completed)
Line items up in a row or column and share out the space between them.
Practice: 3 exercises and 3-question quiz
- CSS grid(completed)
Build layouts with rows and columns at the same time.
Practice: 3 exercises and 3-question quiz
- Positioning(completed)
Move elements out of the normal flow with relative, absolute, fixed and sticky positioning.
Practice: 3 exercises and 3-question quiz
- Responsive design(completed)
Make one page work well on phones, tablets and desktops with flexible sizes and media queries.
Practice: 2 exercises and 3-question quiz