CSS-selectors
Syntaxis om DOM-elementen te selecteren. .btn (class), #id, div p (afstammeling), div > p (kind), :hover (pseudo-class), [type="text"] (attribuut).
Specificiteit telt zo: inline > #id > .class > element, opgeteld als (a,b,c); de hoogste wint. !important doorbreekt alle regels (antipatroon). Moderne selectors: :has() (ouderselector, 2023, een gamechanger), :is()/:where() (controle over specificiteit), :nth-child, :not(). In JavaScript gebruikt document.querySelectorAll('selector') dezelfde syntaxis. De Selectors-API is een W3C-standaard.