Menu Home

only-of-type

osbo.com | CSS | Pseudo-Classes | only-of-type

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

It is the same as :first-of-type:last-of-type.

Syntax

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

Examples

Internal

first-child

first-of-type

last-child

last-of-type

nth-child

nth-last-child

nth-last-of-type

nth-of-type

only-child

External

World Wide Web Consortium (W3C)