Knowledge baseExam Center
ENEnglish
Choose language13

Learn CSS — Basic

Style pages with selectors, colors, typography, the box model, Flexbox and Grid. Practice responsive layouts, print styles and interaction states on local course pages.

COURSE OVERVIEWREADY
Lessons: 39
Quizzes: 7
All steps: 46
$Ready to start
Knowledge base for this technology

What you will learn

  • Choose selectors and understand the cascade, inheritance and rule specificity.
  • Style text, colors, backgrounds and borders, and calculate dimensions using the box model.
  • Build layouts with Flexbox and Grid, choosing spacing, alignment and behavior on small screens.
  • Use media queries, image aspect ratios, print styles and clear hover and focus states with reduced motion in mind.

Course curriculum

Work through the curriculum step by step. Completed stages are marked, and you can open the next available stage.

39 lessons7 quizzes46 steps total
  1. 01LESSON
    LESSON 1: CSS syntax, rule, selector, declaration, commentsAvailable now
  2. 02LESSON
    LESSON 2: Cascade and inheritance (introduction): who “wins” and whyLocked
  3. 03LESSON
    LESSON 3: Specificity (simple model) and source orderLocked
  4. 04LESSON
    LESSON 4: Boxes: box model, content/padding/border/marginLocked
  5. 05LESSON
    LESSON 5: Units: px, %, em, rem, vh/vw, ch, ex, lhLocked
  6. 06LESSON
    LESSON 6: Colors: hex, rgb(), hsl(), transparencyLocked
  7. 01QUIZ
    Quiz 1: lessons 1–6Locked
  8. 07LESSON
    LESSON 7: Display and normal flow: block/inline/inline-blockLocked
  9. 08LESSON
    LESSON 8: DevTools for CSS: inspector, box model, live editsLocked
  10. 09LESSON
    LESSON 9: Type/class/ID selectors, combining selectorsLocked
  11. 10LESSON
    LESSON 10: Combinators: descendant, child, adjacent, siblingLocked
  12. 11LESSON
    LESSON 11: Attribute selectors [attr] (simple matches)Locked
  13. 12LESSON
    LESSON 12: UI pseudo-classes: :hover, :focus, :active, :focus-visibleLocked
  14. 02QUIZ
    Quiz 2: lessons 7–12Locked
  15. 13LESSON
    LESSON 13: ::before/::after pseudo-elements and generated contentLocked
  16. 14LESSON
    LESSON 14: :is() and :where() — safe grouping (basics)Locked
  17. 15LESSON
    LESSON 15: Font family, fallback stack, metricsLocked
  18. 16LESSON
    LESSON 16: Size, line height, letter/word spacingLocked
  19. 17LESSON
    LESSON 17: Line length, text-wrap and hyphens in selected viewsLocked
  20. 18LESSON
    LESSON 18: Text decorations, text-transform, white-spaceLocked
  21. 03QUIZ
    Quiz 3: lessons 13–18Locked
  22. 19LESSON
    LESSON 19: Backgrounds and sizes: background, multiple backgroundsLocked
  23. 20LESSON
    LESSON 20: Borders and border-radius (card patterns)Locked
  24. 21LESSON
    LESSON 21: box-shadow shadows, outline vs borderLocked
  25. 22LESSON
    LESSON 22: Images in a frame: object-fit, object-positionLocked
  26. 23LESSON
    LESSON 23: Margins (collapse), centering on the inline axisLocked
  27. 24LESSON
    LESSON 24: Positioning: relative/absolute/fixed/stickyLocked
  28. 04QUIZ
    Quiz 4: lessons 19–24Locked
  29. 25LESSON
    LESSON 25: Stacking context, z-index, and stacking contextLocked
  30. 26LESSON
    LESSON 26: Historical flow: float/clear (only to understand it)Locked
  31. 27LESSON
    LESSON 27: Flex container and the main/cross axisLocked
  32. 28LESSON
    LESSON 28: Distribution in flex: justify-content, align-itemsLocked
  33. 29LESSON
    LESSON 29: Wrapping and sizing: flex-wrap, flex-basis/grow/shrinkLocked
  34. 05QUIZ
    Quiz 5: lessons 25–29Locked
  35. 30LESSON
    LESSON 30: Aligning individual items: align-selfLocked
  36. 31LESSON
    LESSON 31: Defining a grid: grid-template-columns/rows, gapLocked
  37. 32LESSON
    LESSON 32: Positioning elements, grid-column/rowLocked
  38. 33LESSON
    LESSON 33: Auto placement, fr, minmax() (intro)Locked
  39. 34LESSON
    LESSON 34: Layout patterns: card and gallery templatesLocked
  40. 06QUIZ
    Quiz 6: lessons 30–34Locked
  41. 35LESSON
    LESSON 35: Media queries: mobile-first, width breakpointsLocked
  42. 36LESSON
    LESSON 36: Proportions: aspect-ratio and responsive mediaLocked
  43. 37LESSON
    LESSON 37: The calc()/min()/max()/clamp() functions (intro)Locked
  44. 38LESSON
    LESSON 38: Printing: @media print — basicsLocked
  45. 39LESSON
    LESSON 39: Button and card — from “raw” HTML to styleLocked
  46. 07QUIZ
    Quiz 7: lessons 35–39Locked
  47. +EXAM
    Confirm your skills with an examPreparing with this course is optional. You can choose a certification exam for this language and level without completing the course or quizzes. Check your account access and confirm exam authorization.Other status