As orders slide across the counter at the ice cream parlor, you must use CSS selectors to select different parts, whether it's cones, cups, or scoops of chocolate, mint, and lemon.
Learning Objectives
Learn how to compose CSS selectors, including element, class, and ID selectors; the universal selector *
; combinators such as child >
, adjacent sibling +
, and general sibling ~
; pseudo-classes such as :nth-child
, :only-child
, and :empty
; and attribute selectors such as [attr="value"]
and [attr^="value"]
.
Prerequisites
Knowledge of HTML basics is assumed.