Easy Tutorial
❮ Func Conic Gradient Pr Tab Caption Side ❯

CSS3 :only-of-type Selector

Complete CSS Selectors Reference

Example

Specify each p element that is the only child of its type within its parent element:

p:only-of-type
{
    background:#ff0000;
}

Definition and Usage

:only-of-type represents an element that has no siblings of the same type.


Browser Support

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

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

Complete CSS Selectors Reference

❮ Func Conic Gradient Pr Tab Caption Side ❯