CSS :first-of-type Selector
Description
The :first-of-type CSS pseudo-class represents the first sibling of its type in the list of children of its parent element.
Syntax
:first-of-type { css declarations; }
Example
li { color: #3366ff; background: #ffff99; }
Give it a Try
Click the button below to experiment with this selector.
Browser Support
3.5![]() |
9.0![]() |
4.0![]() |
3.2![]() |
9.6![]() |