first-of-type

The first-of-type CSS pseudo-class represents an element that is the first sibling of its type.

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

Syntax

selector:first-of-type
{
    property: value;
}

Examples

Internal

first-child

last-child

last-of-type

nth-child

nth-last-child

nth-last-of-type

nth-of-type

only-child

only-of-type

External

World Wide Web Consortium (W3C)

Home Menu