Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

last of type

The last-of-type structural pseudo-class selector is used to target and style the last occurrence of the specified element or selector type where it nests with its siblings. It is the same as using nth-last-of-type(1).
Syntax Logicelement:last-of-type { property_list }

CSS Code Example

<style> li:last-of-type { color: red; } </style> <ol> <li>List item</li> <li>List item</li> <li>List item</li> <li>List item</li> </ol> <ol> <li>List item</li> <li>List item</li> <li>List item</li> <li>List item</li> </ol>

CSS

Selectors

universaltypecompoundclassidnotattributedescendantchildadjacent siblinggeneral siblingfirst childlast childonly childfirst of typelast of typeonly of typenth childnth last childnth of typenth last of typeemptyrootfirst linefirst letterbeforeafterlinkvisitedhoveractivefocustargetenableddisabledcheckedlang