CSSBeginner

Learning CSS

From your first rule to modern layout and motion. Every post has live demos you can poke at. Read in order, or dip into a single part.

1 parts · 3 posts · about 33 min read

Fundamentals

How a rule works, which elements it picks, which rule wins, and how every box is sized.

  1. How CSS Works: Rules, Selectors, and Where to Put Them

    What a CSS rule is made of, how the browser matches rules to elements, and inline vs style tag vs external stylesheet, explained with live demos.

    11 min read

  2. CSS Selectors: Every Way to Pick an Element

    Type, class, id, attribute, combinators and pseudo-classes: learn how CSS selectors pick elements, with a live lab where you type your own.

    12 min read

  3. CSS Specificity and the Cascade: Which Rule Wins?

    Why isn't my CSS working? Learn how the cascade and specificity decide which rule wins, with a live demo that ranks every rule and explains each loss.

    10 min read