CSS Pseudo Selectors

Last edited 25th August 2020

Frustrations

The h1:first-child selector means:

Select the first child of its parent
if and only if it's an h1 element.

The :first-child doesn't necessarily mean the fist child of the element, but rather can be to select the first child that meets the certain requirements. There's no going back when the browser parses the DOM.