Loading
A pattern that tells CSS which HTML elements to style — like writing a name tag so the browser knows who gets dressed up.
A pattern expression that matches DOM elements by type, class, ID, attribute, or structural position. Selectors are ranked by specificity to resolve conflicts.
Selectors Level 4 defines a grammar of simple, compound, complex, and relative selectors each with a computed specificity triple (id, class, type). Pseudo-elements create styleable abstractions outside the DOM tree, while the :is()/:where()/:has() functional pseudo-classes enable forgiving and relational selection with distinct specificity semantics.