Style a clear lesson card
Use selectors, declarations and external CSS to turn semantic HTML into a polished learning card.
Build: a reusable card with typography, spacing, color and a clear call to action
Start chapterCSS course
This course is being built as a practical CSS learning path: selectors, cascade, box model, layout, responsive design, components, animation, architecture and production CSS.
:root {
--space-4: 1rem;
--brand: #62d5ff;
}
.lesson-card {
display: grid;
gap: var(--space-4);
padding: clamp(1rem, 3vw, 2rem);
}
@media (max-width: 720px) {
.lesson-card {
grid-template-columns: 1fr;
}
}
Course structure
Each page has its own URL, metadata, previous/next navigation and a full lesson structure. The CSS module is live now and will keep expanding with deeper labs, diagrams and project work.
Chapter projects
CSS sticks when you turn concepts into interface decisions. These chapter projects give the route a practical backbone: learn the model, test it in the lab, then apply it to a real UI problem.
Use selectors, declarations and external CSS to turn semantic HTML into a polished learning card.
Build: a reusable card with typography, spacing, color and a clear call to action
Start chapterTrace which rule wins, reduce specificity pressure and move repeated values into custom properties.
Build: a controlled component variant system without random overrides
Start chapterUse sizing, padding, borders, overflow and display choices to keep cards stable with real content.
Build: three pricing cards that survive long text and narrow screens
Start chapterTurn fonts, scale, color, backgrounds, gradients, shadows and radius into reusable design choices.
Build: a small visual language with tokens for text, surfaces, accents and depth
Start chapterChoose normal flow, flexbox, grid, positioning and spacing systems for the right layout job.
Build: a dashboard band with header, cards, action row, sticky note and clean spacing
Start chapterUse mobile-first CSS, media queries, container queries, fluid layout and touch targets without device guessing.
Build: a card grid that adapts by content width, not by random device names
Start chapterStyle buttons, cards, navigation, forms, tables, modals, badges and states as one coherent system.
Build: an accessible component set with hover, focus, disabled, loading and error states
Start chapterUse transitions, transforms, keyframes, focus states and reduced motion without creating visual noise.
Build: a small interaction pass for buttons, navigation and feedback messages
Start chapterSplit files, name classes, define tokens, use utilities intentionally and debug with a repeatable workflow.
Build: a maintainable CSS folder structure for a growing project
Start chapterCheck accessibility, performance, browser support, feature queries, print CSS, minification and deployment risk.
Build: a practical release checklist you can reuse before shipping client work
Start chapterTooling and cheat sheets
The course now includes practical audit resources: decision trees, checklists and tooling routes. These are intentionally short enough to use during real work, not just to read once.
A compact order of questions for origin, importance, layers, specificity and source order.
Open resourceA practical choice sheet for normal flow, flexbox, grid and positioning.
Open resourceFluid layout, content-driven breakpoints, touch targets, images, zoom and stress tests.
Open resourceFocus visibility, contrast, reduced motion, hit areas, zoom and status indicators.
Open resourceThe final pre-deploy list for support, performance, print, minification and regressions.
Open resourceReal production cases
CSS becomes valuable when it controls real brand experience: premium first screens, lesson layouts, local SEO pages, responsive navigation, contact flows and maintainable design systems.
How this course platform is structured for crawlable lessons, internal links, analytics and long-term content growth.
Read the caseCSS Basics
The first chapter explains what CSS is, how rules are written, how CSS connects to HTML and how DevTools helps you inspect the result.
Learn what CSS does, where it fits in the browser and why visual quality is part of frontend engineering.
Open lessonLearn selectors, declarations, properties, values, braces, semicolons and the browser error model.
Open lessonLearn CSS comment syntax, when comments help, when they become noise and how to use them in larger stylesheets.
Open lessonLearn inline, internal and external CSS, the link element, file paths, loading order and caching.
Open lessonLearn type, class, id, attribute, combinator and pseudo-class selectors with practical strategy.
Open lessonLearn how to inspect CSS, test declarations, debug layout, read computed styles and use responsive tools.
Open lessonCascade & Control
This is the mental model chapter. Specificity, inheritance, source order and layers decide which declaration controls the final pixels.
Learn the complete decision order: origin, importance, layers, specificity, scope, source order and inheritance.
Open lessonLearn class, ID, type, attribute and pseudo-class specificity with practical debugging rules.
Open lessonLearn which CSS properties inherit, which do not and how inherited values affect typography and components.
Open lessonLearn when order matters, how later rules override earlier ones and how to organize stylesheets so order stays predictable.
Open lessonLearn what !important does, why it is risky and where it can be acceptable in controlled CSS systems.
Open lessonLearn @layer, layer order, reset/base/component/utility architecture and how layers reduce selector fights.
Open lessonLearn --custom-properties, var(), fallback values, inheritance, theming and when variables make CSS more maintainable.
Open lessonBox Model
Every element is a box. This chapter makes content, padding, border, margin, dimensions and overflow feel logical instead of random.
Learn the four layers of every element box and how they affect real spacing, sizing and debugging.
Open lessonLearn content-box, border-box and the reset that makes component sizing more predictable.
Open lessonLearn how to size components without trapping content or breaking responsive layouts.
Open lessonLearn margin, margin collapse, auto margins and logical spacing without creating random gaps.
Open lessonLearn how padding affects buttons, cards, forms, touch targets and responsive component comfort.
Open lessonLearn border width, style, color, radius context and why borders are not the same as outlines.
Open lessonLearn overflow visible, hidden, auto, scroll and clip with real layout and accessibility consequences.
Open lessonLearn block, inline, inline-block, flex, grid and display none as the start of layout thinking.
Open lessonTypography & Visual Style
CSS is not only layout. It is also reading quality, contrast, visual hierarchy, rhythm and the feeling of a professional interface.
Learn font families, fallback stacks, web font loading, readability and why typography starts before font-size.
Open lessonLearn rem, em, px, clamp(), responsive type scales and why font size should be a system.
Open lessonLearn unitless line-height, paragraph rhythm, heading tightness and readable long-form text.
Open lessonLearn left, center, right and logical alignment with practical rules for readability and interface design.
Open lessonLearn color values, contrast, semantic tokens, foreground/background pairs and state colors.
Open lessonLearn background color, image, repeat, size, position, layers and readable foreground control.
Open lessonLearn linear, radial and conic gradients with stops, angles, overlays and subtle production use.
Open lessonLearn box-shadow, text-shadow, elevation systems, soft depth and when shadows become visual noise.
Open lessonLearn consistent radius systems, pills, cards, images, overflow clipping and shape language.
Open lessonLayout
Flexbox, grid, positioning and spacing systems are where CSS becomes serious frontend engineering.
Learn block flow, inline flow, document order, intrinsic layout and why good CSS starts by respecting the browser.
Open lessonLearn flex containers, main axis, cross axis, flex growth, wrapping and when flexbox is better than grid.
Open lessonLearn main-axis alignment, cross-axis alignment, gap, auto margins and common button/nav alignment patterns.
Open lessonLearn grid containers, tracks, gap, fr units, repeat(), minmax() and auto-fit responsive grids.
Open lessonLearn grid-column, grid-row, span, named areas and safe placement patterns for real layouts.
Open lessonLearn static, relative, absolute, fixed and how containing blocks decide where positioned elements land.
Open lessonLearn stacking contexts, positioned elements, z-index scales and why higher numbers do not always win.
Open lessonLearn position sticky, offsets, scroll containers, sticky sidebars and common failure causes.
Open lessonLearn spacing tokens, vertical rhythm, gap, section spacing and how consistent spacing makes interfaces feel premium.
Open lessonResponsive CSS
Responsive design starts with flexible thinking, not hundreds of breakpoints. This chapter builds that habit.
Learn progressive layout, base styles, min-width media queries, content priority and why mobile-first keeps CSS cleaner.
Open lessonLearn min-width, max-width, range syntax, motion preferences, hover capability and practical media query discipline.
Open lessonLearn container-type, named containers, @container rules and why component-level responsiveness is a serious upgrade.
Open lessonLearn flexible widths, clamp(), min(), max(), minmax(), auto-fit and why fluid CSS reduces breakpoint pressure.
Open lessonLearn max-width, aspect-ratio, object-fit, srcset, sizes, picture and art direction for real responsive media.
Open lessonLearn content-driven breakpoints, named tokens, common ranges, testing widths and avoiding breakpoint clutter.
Open lessonLearn minimum target sizes, spacing, hover alternatives, pointer queries and mobile-friendly controls.
Open lessonComponents
Buttons, cards, navigation and forms need reusable styling rules, states and predictable naming.
Learn button anatomy, variants, sizing, focus-visible, disabled states, icon buttons and why buttons need real interaction states.
Open lessonLearn card anatomy, media framing, content rhythm, actions, hover states, equal height traps and responsive card grids.
Open lessonLearn nav structure, active states, responsive navigation, focus states, spacing, dropdown caution and touch-friendly menus.
Open lessonLearn labels, input sizing, focus, error states, help text, disabled controls and why forms need calm CSS.
Open lessonLearn table hierarchy, headers, alignment, numeric columns, responsive overflow and when not to use a table.
Open lessonLearn overlay structure, dialog sizing, focus states, close buttons, scroll behavior and mobile-safe modal layout.
Open lessonLearn status colors, labels, icon support, contrast, alert hierarchy and when badges should be subtle versus urgent.
Open lessonLearn state planning, pseudo-classes, data attributes, aria states, loading states and why unfinished states make UI feel cheap.
Open lessonAnimation & Interaction
Good motion makes a site feel alive. Bad motion makes it noisy, slow or inaccessible.
Learn what can transition, how duration and easing change the feel, why transition: all is risky and how to keep motion responsive.
Open lessonLearn translate, scale, rotate, transform-origin, visual-only movement and why transforms are usually better than animating top or left.
Open lessonLearn @keyframes, animation-name, duration, timing-function, iteration-count, fill-mode and when keyframes are better than transitions.
Open lessonLearn :hover, :focus, :focus-visible, active states, pointer differences and why hover cannot be the only way to reveal important UI.
Open lessonLearn prefers-reduced-motion, when to remove animation, when to simplify it and how to keep meaning without movement.
Open lessonLearn how to design small interaction details with purpose, timing, states, accessibility and production restraint.
Open lessonCSS Architecture
A stylesheet must be searchable, scalable and team-friendly. This chapter is about avoiding CSS chaos.
Learn how to organize base CSS, tokens, layout, components, utilities and page-specific exceptions without creating a maze.
Open lessonLearn semantic class naming, BEM-style structure, state names, component prefixes and why visual names become technical debt.
Open lessonLearn when utilities help, when they hurt, how to keep them limited and how they differ from component classes.
Open lessonLearn token naming, custom properties, semantic tokens, component tokens and why hard-coded values make redesigns expensive.
Open lessonLearn component boundaries, local selectors, state classes, variants, composition and how to prevent components from knowing too much.
Open lessonLearn when to split CSS, how to avoid huge files, what belongs in shared bundles and why too many files can also hurt.
Open lessonLearn a professional CSS debugging workflow for cascade problems, layout overflow, missing styles, specificity fights and responsive breakage.
Open lessonProduction CSS
Production CSS needs accessibility, performance, browser support checks and release discipline.
Learn focus visibility, contrast, readable text, motion preferences, hit targets, visually hidden content and CSS choices that can break accessibility.
Open lessonLearn render cost, selector scope, unused CSS, layout thrashing, heavy shadows, animations, critical CSS and why performance is also design quality.
Open lessonLearn support strategy, progressive enhancement, fallbacks, testing real browsers, feature queries and why perfect sameness is not the goal.
Open lessonLearn feature queries, safe enhancement, not conditions, and/or logic, fallback placement and real examples with grid, container queries and modern selectors.
Open lessonLearn @media print, hiding navigation, showing URLs, controlling page breaks, simplifying colors and making printed pages useful.
Open lessonLearn minification, compression, source maps, cache busting, build pipelines and why humans should not maintain minified CSS by hand.
Open lessonLearn a practical pre-release CSS checklist for responsive layouts, accessibility, performance, browser support, content stress tests and deployment sanity.
Open lesson