CSS
CSS from the first rule to production: selectors, the cascade, the box model, flexbox and grid, responsive design, colour, type, motion, Sass and Tailwind.
71 lessons: 11 free, 43 free with Pro answers and 17 with a free core.
Examples run with Node.js 24.21.0.
Who it is for
Web learners, designers and front-end developers who struggle with layout.
What you will be able to do
- Explain how a browser parses, matches, cascades and lays out CSS, and inspect each step in DevTools
- Write selectors and predict which declaration wins through the cascade, specificity and layers
- Size and space boxes with the box model, modern units and math functions
- Build layouts with normal flow, positioning, flexbox and grid
- Make pages responsive with media queries, container queries and fluid type
- Style colour, text and themes, including dark mode, Indic scripts such as Devanagari, and right-to-left text
- Organise stylesheets with custom properties, nesting, @scope and cascade layers
- Add motion with transitions, animations and view transitions that respect user preferences
- Use Sass, Bootstrap 5.3 and Tailwind CSS 4, and know when native CSS is enough
- Check browser support with Baseline, then debug, speed up and test CSS for accessibility
Revise and practise
- Practice: every exercise and quiz (52 exercises, 71 quizzes)
Modules and lessons
What the labels mean
- Free
- the whole lesson and every answer in it
- Free lesson, Pro answers
- the whole lesson is free; the model answers to its interview questions open with a pass
- Free core, Pro depth
- the core of the lesson is free; its in-depth parts open with a pass
- Pro
- opens with a Pro, Premium or Ultimate pass
Minutes are reading time: “10 of 25 min free” means 10 minutes of the lesson are free.
What a pass opens in this track
34 in-depth parts and 138 interview answers. The same pass opens every other track and every Pro tool.
- Module 1
How CSS works
How a browser turns CSS into pixels, the parts of a rule, linking stylesheets and browser defaults, inspecting CSS in DevTools, and reading Baseline support.
- How browsers apply CSS to a page Free lesson, Pro answers: 20 minutes
- Adding CSS to HTML and browser default styles Free core, Pro depth: 10 of 25 minutes free
- Inspecting CSS with browser DevTools Free core, Pro depth: 8 of 25 minutes free
- CSS browser support: Baseline and the Snapshot Free core, Pro depth: 7 of 20 minutes free
- Module 2
Selectors
Type, class, ID and attribute selectors, combinators, pseudo-classes for state and structure, :is(), :where(), :not() and :has(), and pseudo-elements.
- Type, class, ID, attribute and combinators Free lesson, Pro answers: 30 minutes
- Pseudo-classes for state and structure Free core, Pro depth: 8 of 30 minutes free
- :is(), :where(), :not() and :has() Free core, Pro depth: 11 of 30 minutes free
- Pseudo-elements, generated content and counters Free core, Pro depth: 10 of 30 minutes free
- Module 3
The cascade, specificity and layers
How the cascade picks one declaration, calculating specificity, inheritance and computed values, and organising styles with cascade layers.
- The cascade: which declaration wins Free lesson, Pro answers: 35 minutes
- Specificity: calculating and controlling it Free core, Pro depth: 18 of 35 minutes free
- Inheritance, global keywords and computed values Free core, Pro depth: 14 of 35 minutes free
- Cascade layers with @layer Free core, Pro depth: 15 of 35 minutes free
- Module 4
The box model, sizing and overflow
Content, padding, border and margin, margin collapse and formatting contexts, percentage and intrinsic sizes, aspect ratios, and overflow.
- The box model: content, padding, border, margin Free lesson, Pro answers: 25 minutes
- Margin collapse and formatting contexts Free core, Pro depth: 7 of 25 minutes free
- Sizing: percentages, intrinsic sizes and ratios Free core, Pro depth: 9 of 30 minutes free
- Overflow, scroll containers and truncation Free: 25 minutes
- Module 5
Values, units and math functions
Absolute and relative lengths, viewport units for mobile browsers, and calc(), min(), max(), clamp() and the newer math functions.
- Lengths and units: px, em, rem, ch and lh Free lesson, Pro answers: 25 minutes
- Viewport units: vw, dvh, svh and lvh Free core, Pro depth: 8 of 20 minutes free
- calc(), min(), max(), clamp() and newer math Free core, Pro depth: 9 of 25 minutes free
- Module 6
Colour and theming
Colour syntax, OKLCH and wide-gamut colour, color-mix() and relative colours, contrast, dark mode, colour schemes and forced colours.
- Colour syntax: hex, rgb(), hsl() and keywords Free lesson, Pro answers: 25 minutes
- OKLCH, Oklab and wide-gamut colour Free core, Pro depth: 11 of 30 minutes free
- color-mix(), relative colour and contrast-color() Free core, Pro depth: 9 of 30 minutes free
- Dark mode, colour schemes and forced colours Free core, Pro depth: 11 of 30 minutes free
- Module 8
Backgrounds, borders, images and effects
Backgrounds, borders and shadows, gradients and patterns, images, video and SVG in CSS, and filters, blend modes, masks and clipping.
- Backgrounds, borders and shadows Free: 25 minutes
- Gradients: linear, radial, conic and patterns Free lesson, Pro answers: 25 minutes
- Images, video and SVG in CSS Free: 25 minutes
- Module 9
Normal flow, positioning and stacking
Normal flow and the display property, relative, absolute, fixed and sticky positioning, and stacking contexts with z-index.
- Normal flow and the display property Free: 30 minutes
- Positioning: relative, absolute, fixed and sticky Free lesson, Pro answers: 30 minutes
- Stacking contexts and z-index Free lesson, Pro answers: 30 minutes
- Module 10
Flexbox
Axes, wrapping and gap, how flex items grow and shrink, alignment, auto margins and order, and flexbox patterns for real interfaces.
- Flexbox fundamentals: axes, wrapping and gap Free lesson, Pro answers: 25 minutes
- How flex items grow, shrink and size Free lesson, Pro answers: 30 minutes
- Flex alignment, auto margins and order Free lesson, Pro answers: 25 minutes
- Flexbox patterns for real interfaces Free lesson, Pro answers: 30 minutes
- Module 11
CSS Grid
Tracks, fr units and placement, named areas and lines, responsive grids with minmax() and auto-fit, subgrid, alignment and overlap.
- Grid fundamentals: tracks, fr and placement Free lesson, Pro answers: 30 minutes
- Grid areas and named lines Free: 25 minutes
- Responsive grids: minmax(), auto-fit, auto-fill Free lesson, Pro answers: 25 minutes
- Subgrid: aligning nested content Free lesson, Pro answers: 25 minutes
- Grid alignment, overlap and new grid features Free lesson, Pro answers: 25 minutes
- Module 12
Responsive design: media and container queries
Responsive foundations, media queries with range syntax and user preferences, container queries, fluid type and spacing, and intrinsic layouts.
- Responsive design foundations Free lesson, Pro answers: 25 minutes
- Media queries: range syntax and user preferences Free: 25 minutes
- Container queries and container units Free: 30 minutes
- Fluid typography and spacing scales Free lesson, Pro answers: 25 minutes
- Layouts that adapt without breakpoints Free lesson, Pro answers: 35 minutes
- Module 13
International layout: logical properties, writing modes and Indian scripts
India-specificLogical properties for any writing direction, vertical and bidirectional text, and typography for Devanagari and other Indian scripts.
- Logical properties for any writing direction Free lesson, Pro answers: 25 minutes
- Writing modes, vertical and bidirectional text Free core, Pro depth: 6 of 25 minutes free
- Typography for Indian scripts Free: 30 minutes
- Module 14
Custom properties, nesting, scope and architecture
Custom properties and @property, native nesting, @scope and component styles, and naming, structure and design tokens for large stylesheets.
- Custom properties (CSS variables) Free lesson, Pro answers: 25 minutes
- Typed custom properties with @property Free lesson, Pro answers: 25 minutes
- CSS architecture, naming and design tokens Free lesson, Pro answers: 35 minutes
- Module 15
Feature queries and the newest conditional CSS
Feature queries and progressive enhancement, container style and state queries, and the newest conditional functions such as if() and attr().
- Feature queries and progressive enhancement Free lesson, Pro answers: 25 minutes
- Container style queries and state queries Free lesson, Pro answers: 25 minutes
- Module 16
Transitions, animations, scroll and view transitions
Transitions and @starting-style, keyframe animations, 2D and 3D transforms, scroll snap, scroll-driven animations and view transitions.
- Transitions and @starting-style Free: 25 minutes
- Keyframe animations and smooth motion Free lesson, Pro answers: 25 minutes
- Transforms: translate, rotate, scale and 3D Free lesson, Pro answers: 20 minutes
- Scroll snap and scroll-driven animations Free lesson, Pro answers: 30 minutes
- View transitions for pages and components Free lesson, Pro answers: 30 minutes
- Module 17
Forms, tables, popovers and anchor positioning
Styling form controls and tables, popovers, dialogs and disclosure widgets, and anchor positioning for tooltips and menus.
- Styling forms and form controls Free: 30 minutes
- Popovers, dialogs and disclosure widgets Free: 25 minutes
- Anchor positioning for tooltips and menus Free lesson, Pro answers: 30 minutes
- Module 19
Sass modules, migrating off @import and Sass in production
@use and @forward, migrating a project off @import, and using Sass in production alongside native CSS features.
- Sass modules: @use, @forward and configuration Free lesson, Pro answers: 30 minutes
- Migrating Sass from @import to modules Free lesson, Pro answers: 35 minutes
- Sass in production and when to use native CSS Free lesson, Pro answers: 30 minutes
- Module 20
Bootstrap 5.3: grid, utilities, components and JavaScript
Setting up Bootstrap 5.3, Reboot and colour modes, the grid, utilities and the utility API, components and forms, and its JavaScript plugins.
- Bootstrap 5.3: setup, Reboot and colour modes Free lesson, Pro answers: 25 minutes
- The Bootstrap grid: containers, rows and columns Free lesson, Pro answers: 30 minutes
- Module 22
Utility-first CSS with Tailwind CSS 4
Utility-first CSS with Tailwind CSS 4, themes, tokens and custom utilities, and responsive design and production builds with Tailwind.
- Utility-first CSS with Tailwind CSS v4 Free lesson, Pro answers: 30 minutes
- Module 23
Debugging, performance, accessibility, tooling and print
Debugging CSS step by step, performance and Core Web Vitals, accessible CSS, linters and build tools, and print stylesheets.
- Debugging CSS systematically Free lesson, Pro answers: 30 minutes
- Accessible CSS: focus, motion, contrast and reflow Free lesson, Pro answers: 30 minutes
- Tooling: stylelint, Lightning CSS, PostCSS and Sass Free lesson, Pro answers: 25 minutes
- Print stylesheets and paged media Free lesson, Pro answers: 20 minutes
- Module 24
Design to code and interview preparation
Turning a design file into maintainable CSS, and preparing for front-end and CSS interview questions.
- From design file to CSS: a build workflow Free lesson, Pro answers: 35 minutes
- CSS interview preparation Free lesson, Pro answers: 30 minutes
Related tools
Official documentation
- CSS Snapshot 2026 (W3C CSS Working Group)
- CSS: Cascading Style Sheets (MDN Web Docs) (Mozilla)
- Baseline (web-features) (W3C WebDX Community Group)
- HTML Standard: Rendering (WHATWG)