Learn CSS
Turn plain HTML into designed pages. Write CSS rules and selectors, style text and backgrounds, size and space elements with the box model, position them, and choose colors and fonts with confidence.
- Beginner level
- 7 modules
- 50 lessons
- 144 tasks and questions
Syllabus
01Setup and SyntaxWhat CSS is, how a rule is written, and the three ways to attach styles to a page - inline, in a style element and in a linked stylesheet.5 lessons
02SelectorsTarget exactly the elements you mean - by type, class, id, attribute and state - combine selectors, and understand which rule wins when several apply.9 lessons
03Visual RulesThe properties you'll use on almost every page - font family, size and weight, text alignment, text and background colors, opacity, background images - and why !important is a last resort.7 lessons
04The Box ModelEvery element is a box. Size it with width and height, wrap it in borders, space it with padding and margin, cap it with min and max sizes, handle overflowing content and switch to border-box sizing.10 lessons
05Display and PositioningControl how boxes flow and where they sit - block, inline and inline-block display, relative, absolute, fixed and sticky positioning, stacking with z-index, and floats.7 lessons
06ColorsGo beyond named colors. Write colors as hex codes, rgb() and hsl(), build a palette from a single hue, and add transparency with an alpha channel.5 lessons
07TypographySet text that's pleasant to read. Build font stacks, choose weights and styles, adjust case and spacing, control line height and line length, and load web fonts from a service or your own files.7 lessons