Skip to content

CSS Selectors

First Child


The :first-child pseudo-class matches an element that is the first child element of its parent.

First child

The first div in the list is matched.

Flex Order

CSS properties like flex order or display: none don't affect the matching as the order in the DOM is what matters.