last-child (:last-child)

The :last-child CSS pseudo-class represents any element that is the last child element of its parent.

Example

<!DOCTYPE html>
<html>
    <head>
        <style>
            li:last-child {
                background-color: lime;
            }
        </style>
    </head>
    <body>
        <ul>
            <li>
                This item is 1
            </li>
            <li>
                This item is 2
            </li>
            <li>
                This item is 3
            </li>
        </ul>
    </body>
</html>