Easy Tutorial
❮ Css3 Pr Box Align Css3 Pr Border Top Left Radius ❯

CSS3 :first-of-type Selector

Complete CSS Selectors Reference

Example

Selects the p element that is the first p element of its parent:


Definition and Usage

The :first-of-type selector matches an element that is the first child of its type within its parent.

Tip: This is the same as :nth-of-type(1).


Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Selector
:first-of-type 4.0 9.0 3.5 3.2 9.6

Complete CSS Selectors Reference

❮ Css3 Pr Box Align Css3 Pr Border Top Left Radius ❯