Guided Notes

Selectors & Specificity

Combinators, attribute selectors, pseudo-classes, pseudo-elements, specificity, and inheritance.

Combinators

Slide 1 / 5

Combinators select elements by their relationship to others:

SelectorMatches
nav aAny <a> inside <nav> (descendant)
ul > li<li> that are direct children of <ul>
h2 + pThe <p> immediately after an <h2>
h2 ~ pEvery <p> after an <h2>, same parent
a.buttonAn <a> that also has class="button"
← Text & Fonts