Beginner
-
Type, class and ID selectors
Target elements by type, class and ID, group selectors, and why classes are usually the right choice.
-
Positioning: relative, absolute, fixed and sticky
How each position value works, containing blocks, and sticky headers and sidebars.
-
The cascade, specificity and inheritance
How browsers decide which rule wins, calculating specificity, inherited properties, and why to avoid !important.
-
Stacking context and z-index
Why z-index sometimes does nothing: stacking contexts, what creates them, and how to debug layering.
-
Colours in CSS: hex, rgb, hsl and oklch
Every way to write colour in CSS, transparency, and why oklch gives more predictable palettes.
-
Web fonts: @font-face, font-display and variable fonts
Load custom fonts, avoid invisible text with font-display, self-host versus Google Fonts, and variable font axes.
-
CSS units: px, em, rem, %, vw and vh
Absolute and relative units, when to use each, and why rem is the usual choice for type.
-
Custom properties (CSS variables)
Define and use custom properties, scope and inheritance, fallbacks, and theming with tokens.
-
The box model: content, padding, border and margin
How every element is a box, how its size is calculated, and margin collapsing.
-
Transitions
Animate state changes smoothly with transition, timing functions, and properties that animate cheaply.
-
box-sizing and controlling element size
border-box versus content-box, width and height, min and max sizes, and the common reset.
-
Keyframe animations and reduced motion
Build multi-step animations with @keyframes, control them with animation properties, and respect prefers-reduced-motion.
-
Display: block, inline and inline-block
How display changes layout behaviour, and a first look at flex and grid values.
-
Transforms: translate, scale and rotate
Move, scale and rotate elements with transforms, the individual transform properties, and transform-origin.
-
Text and font styling
Font families and fallbacks, size, weight, line height, letter spacing and text alignment for readable text.
-
Overflow and scrolling: overflow, scroll snap and smooth scrolling
Handle content that does not fit, truncate text, build scroll-snapping carousels, and control scroll behaviour.
-
Backgrounds, borders and shadows
Background colours and images, gradients, borders, radius and box shadows.
-
Cascade layers with @layer
Organise CSS into layers so resets, frameworks and components stop fighting over specificity.
-
Introduction to Flexbox
Lay out items in a row or column with display: flex, direction, gap and basic alignment.
-
Modern selectors: :has(), :is() and :where()
The parent selector :has(), and :is() and :where() for shorter selectors with controlled specificity.