Description

Structural pseudo-class, E:only-of-type an E element that is the only sibling of its type for the parent.

There will be no other elements of the same type in the same parent.

See also:

  • :only-child
  • :first-child
  • :nth-child
  • :last-of-type
  • :nth-last-child
  • :nth-of-type
  • :only-of-type
Live Example
Play with the code in the textarea below.

Introduced in CSS version
3
Applies to elements
All
Inherited
N/A
Browser Support
BrowsersIEFirefoxSafariOperaChrome
Versions913.19.50.4
Belongs to:

See the full list CSS properties and browser support: CSS Properties