Skip to content

CSS Selectors

Only Of Type

About

The :only-of-type pseudo-class matches an element if it's the only element of its type among its siblings.

Only Type

The selector matches the p element as it's the only paragraph element in the list. The div elements are not matched because there is more than one of them.