CSS :last-of-type Selector

❮ Previous Selectors Next ❯

Example

p:last-of-type {
  color: red;
}

Meaning

The :last-of-type selector selects the element that is the last child of its parent that is of its type.

Version: CSS3




Standard Syntax

:last-of-type {
  css declarations;
}



Browser Support

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




Status







❮ Previous Selectors Next ❯