Pseudo-element :last-child
The :last-child CSS pseudo-class represents the last element among a group of sibling elements.
p:last-child
Selects every
element that is the last child
of its parent
Example
p:last-child {
color: lime;
background-color: black;
padding: 5px;
}
ul li {
color: blue;
}
ul li:last-child {
border: 1px solid red;
color: red;
}