Syllabus

  1. 01Setup and SyntaxWhat CSS is, how a rule is written, and the three ways to attach styles to a page - inline, in a style element and in a linked stylesheet.5 lessons
    1. 01What CSS Does
    2. 02Inline Styles
    3. 03The style Element
    4. 04Linking a Stylesheet
    5. 05Setup and Syntax Quiz
  2. 02SelectorsTarget exactly the elements you mean - by type, class, id, attribute and state - combine selectors, and understand which rule wins when several apply.9 lessons
    1. 01Type and Universal Selectors
    2. 02Classes
    3. 03IDs
    4. 04Attribute Selectors
    5. 05Pseudo-classes
    6. 06Specificity
    7. 07Chaining and Descendant Selectors
    8. 08Grouping Selectors
    9. 09Selectors Quiz
  3. 03Visual RulesThe properties you'll use on almost every page - font family, size and weight, text alignment, text and background colors, opacity, background images - and why !important is a last resort.7 lessons
    1. 01Font Family, Size and Weight
    2. 02Text Alignment
    3. 03Text and Background Colors
    4. 04Opacity
    5. 05Background Images
    6. 06!important
    7. 07Visual Rules Quiz
  4. 04The Box ModelEvery element is a box. Size it with width and height, wrap it in borders, space it with padding and margin, cap it with min and max sizes, handle overflowing content and switch to border-box sizing.10 lessons
    1. 01Boxes, Width and Height
    2. 02Borders
    3. 03Padding
    4. 04Margin
    5. 05Minimum and Maximum Sizes
    6. 06Overflow
    7. 07How Big Is a Box?
    8. 08Box Sizing and Resets
    9. 09Hiding Elements
    10. 10Box Model Quiz
  5. 05Display and PositioningControl how boxes flow and where they sit - block, inline and inline-block display, relative, absolute, fixed and sticky positioning, stacking with z-index, and floats.7 lessons
    1. 01Block, Inline and Inline-block
    2. 02Relative Positioning
    3. 03Absolute Positioning
    4. 04Fixed and Sticky
    5. 05Stacking with z-index
    6. 06Float and Clear
    7. 07Display and Positioning Quiz
  6. 06ColorsGo beyond named colors. Write colors as hex codes, rgb() and hsl(), build a palette from a single hue, and add transparency with an alpha channel.5 lessons
    1. 01Hex Colors
    2. 02RGB Colors
    3. 03HSL Colors
    4. 04Transparent Colors
    5. 05Colors Quiz
  7. 07TypographySet text that's pleasant to read. Build font stacks, choose weights and styles, adjust case and spacing, control line height and line length, and load web fonts from a service or your own files.7 lessons
    1. 01Font Stacks and Generic Families
    2. 02Weight and Style
    3. 03Case and Letter Spacing
    4. 04Line Height and Line Length
    5. 05Fonts from a Font Service
    6. 06Hosting Fonts with @font-face
    7. 07Typography Quiz