CSS
Curriculum
CSS · Frontend

CSS Tutorial

A complete CSS path from beginner to pro - selectors, box model, Flexbox, Grid, responsive design, motion, architecture, and real UI projects.

65 lessonsBeginner → ProFrontend
Start from the beginning

Curriculum

Work through each section in order. Every lesson ends with practice and key points so the idea sticks.

Beginner

Getting Started

5 lessons · ~48 min
  1. 1
    What is CSS?

    Learn what CSS is, how it works with HTML, and why stylesheets matter for every web page.

  2. 2
    Ways to Add CSS

    Learn the three ways to add CSS to a page: inline styles, internal stylesheets, and external CSS files.

  3. 3
    Selectors Basics

    Learn how element, class, and ID selectors target HTML so your CSS rules apply to the right parts of a page.

  4. 4
    Colors and Units

    Learn common CSS color formats and length units so you can set colors, sizes, and spacing with confidence.

  5. 5
    Cascade and Specificity Intro

    Learn how CSS decides which rule wins when multiple rules target the same element.

Beginner

Box Model

5 lessons · ~48 min
  1. 6
    The Box Model

    Learn the CSS box model: content, padding, border, and margin, and how they build every element on the page.

  2. 7
    Margin and Padding

    Learn how margin and padding create space inside and outside elements, including shorthand and common layout patterns.

  3. 8
    Borders and Outline

    Learn how to draw borders and outlines, including width, style, color, radius, and when outline is the better choice.

  4. 9
    Width, Height, and max-width

    Learn how width, height, min/max constraints, and percentage sizing control element dimensions.

  5. 10
    box-sizing

    Learn how box-sizing changes whether padding and border are included in an element width and height.

Beginner

Typography

4 lessons · ~38 min
  1. 11
    Fonts and Text

    Learn core typography properties: font-family, font-size, font-weight, and related text styling controls.

  2. 12
    Line Height and Spacing

    Learn how line-height, letter-spacing, and word-spacing affect readability and rhythm in text blocks.

  3. 13
    Align and Decorations

    Learn text-align, text-decoration, text-indent, and related properties for alignment and text ornaments.

  4. 14
    Web Fonts Intro

    Learn how web fonts work at a beginner level, including system fonts, @font-face ideas, and practical loading tips.

Beginner

Layout Basics

6 lessons · ~61 min
  1. 15
    The display Property

    Learn how display controls whether elements behave as block, inline, inline-block, none, flex, and more.

  2. 16
    Position Basics

    Learn static, relative, absolute, fixed, and sticky positioning, plus top/right/bottom/left offsets.

  3. 17
    Flexbox Intro

    Learn what flexbox is, how to create a flex container, and how children become flex items.

  4. 18
    flex-direction and wrap

    Learn how flex-direction and flex-wrap control the direction of the main axis and whether items wrap to new lines.

  5. 19
    Justify and Align

    Learn justify-content, align-items, and align-self to distribute and align flex items on the main and cross axes.

  6. 20
    Gap in Flex Layouts

    Learn how the gap property spaces flex items cleanly without margin tricks.

Beginner

Practice

5 lessons · ~56 min
  1. 21
    Backgrounds

    Learn background-color, background-image, size, position, and practical layering basics for surfaces and heroes.

  2. 22
    Pseudo-classes (:hover, :focus)

    Learn interactive pseudo-classes such as :hover, :focus, and :active to style user interaction states.

  3. 23
    Pseudo-elements

    Learn ::before, ::after, and other pseudo-elements for decorative content and text fragments.

  4. 24
    Mini Project: Card Layout

    Build a small responsive card layout that practices the box model, typography, flexbox, and hover states.

  5. 25
    Beginner Review

    Review the core beginner CSS ideas: cascade, box model, typography, display, positioning, and flexbox.

Intermediate

Responsive

5 lessons · ~61 min
  1. 26
    Responsive Design Intro

    Learn why responsive design matters and how fluid layouts, flexible media, and breakpoints work together across screen sizes.

  2. 27
    Media Queries

    Write media queries that change layout, typography, and component behavior at the right viewport conditions.

  3. 28
    Fluid Images and Media

    Make images, video, and embedded media scale safely inside responsive layouts without overflow or distortion.

  4. 29
    Mobile-First CSS

    Write base styles for small screens first, then progressively enhance the layout with min-width media queries.

  5. 30
    Container Queries Intro

    Style components based on their parent container size instead of only the viewport width.

Intermediate

Grid

5 lessons · ~60 min
  1. 31
    CSS Grid Intro

    Understand CSS Grid as a two-dimensional layout system for rows and columns working together.

  2. 32
    grid-template-columns/rows

    Define grid tracks with fixed sizes, fr units, repeat(), minmax(), and auto-fit patterns.

  3. 33
    Grid Template Areas

    Name layout regions with grid-template-areas and assign items to those areas for readable page structure.

  4. 34
    Gap and Alignment in Grid

    Control spacing with gap and align grid items or tracks using justify and align properties.

  5. 35
    Grid vs Flexbox

    Choose Grid or Flexbox with confidence by comparing one-dimensional and two-dimensional layout needs.

Intermediate

Visual Design

5 lessons · ~60 min
  1. 36
    CSS Variables

    Define reusable design tokens with custom properties for color, spacing, type, and theme switches.

  2. 37
    Gradients and Shadows

    Add depth and atmosphere with linear and radial gradients plus layered box and text shadows.

  3. 38
    Transforms

    Move, scale, rotate, and skew elements with transform functions for polish and interactive feedback.

  4. 39
    Transitions

    Animate property changes smoothly over time with transition-property, duration, easing, and delay.

  5. 40
    Animations Basics

    Build keyframe animations for attention, loading states, and entrance effects with control over timing and iteration.

Intermediate

Components

5 lessons · ~61 min
  1. 41
    Navigation Styles

    Style site navigation for desktop and small screens, including flex toolbars and mobile menu patterns.

  2. 42
    Buttons and Badges

    Build consistent button variants and compact badges with shared tokens, states, and accessible contrast.

  3. 43
    Styling Forms

    Style labels, inputs, textareas, and focus states so forms are readable, consistent, and keyboard-friendly.

  4. 44
    Cards and Lists

    Compose card surfaces and structured lists for content collections, dashboards, and feature grids.

  5. 45
    prefers-color-scheme

    Support light and dark themes with prefers-color-scheme and CSS variables that swap design tokens.

Intermediate

Projects

3 lessons · ~50 min
  1. 46
    Project: Responsive Landing

    Build a responsive landing page that combines fluid layout, media queries, visual polish, and reusable components.

  2. 47
    Project: Dashboard Layout

    Construct a dashboard shell with grid areas, responsive stacking, cards, and a compact toolbar.

  3. 48
    Intermediate Review

    Review responsive techniques, Grid, visual design tools, and component patterns from the intermediate CSS path.

Advanced

Modern CSS

5 lessons · ~79 min
  1. 49
    Fluid Sizing with clamp, min, and max

    Build responsive type, spacing, and layout values with min(), max(), and clamp() instead of endless media query breakpoints.

  2. 50
    Logical Properties

    Write direction-aware CSS with inline and block axes so layouts adapt cleanly for left-to-right and right-to-left writing modes.

  3. 51
    The :has() Selector

    Style a parent based on its children or descendants with :has(), unlocking patterns that once required JavaScript.

  4. 52
    Cascade Layers with @layer

    Organize cascade priority with @layer so resets, tokens, components, and utilities stop fighting each other.

  5. 53
    Native CSS Nesting

    Write nested CSS rules natively in the browser, keeping component styles readable without a preprocessor requirement.

Advanced

CSS Architecture

5 lessons · ~80 min
  1. 54
    BEM Naming

    Name CSS classes with Block, Element, Modifier so large stylesheets stay searchable, predictable, and low in specificity.

  2. 55
    Utility vs Semantic CSS

    Choose when to write semantic component classes and when utility classes are the clearer, faster tool.

  3. 56
    Design Tokens in CSS

    Centralize color, space, type, and motion decisions as CSS custom properties so themes and products stay consistent.

  4. 57
    Accessibility-Friendly CSS

    Use CSS to support keyboard users, motion preferences, contrast, focus visibility, and content that remains usable when styles change.

  5. 58
    Print Stylesheets

    Craft print-ready pages with @media print so articles, invoices, and reports stay readable on paper and PDFs.

Advanced

Capstones

7 lessons · ~123 min
  1. 59
    Capstone: Mini Design System

    Build a compact CSS design system with tokens, layers, base styles, components, and utilities you can reuse across pages.

  2. 60
    Capstone: Marketing Page

    Compose a polished marketing landing page with fluid type, logical spacing, modern selectors, and your mini design system.

  3. 61
    Capstone: App Shell Layout

    Build a responsive application shell with sticky header, collapsible navigation, main content, and utility regions.

  4. 62
    CSS Performance Tips

    Write CSS that stays fast: fewer layout thrash risks, lean selectors, efficient animations, and delivery habits that reduce render delay.

  5. 63
    Production CSS Checklist

    Run a practical pre-release checklist covering architecture, accessibility, responsiveness, print, and maintainability.

  6. 64
    CSS Frameworks Overview

    Compare utility-first, component kits, and CSS-in-JS-adjacent approaches so you can choose tools without abandoning core CSS skills.

  7. 65
    Next Steps After CSS

    Map what to learn next after advanced CSS: deeper layout mastery, design systems, frontend frameworks, and real project practice.