CSS tutorial > CSS pseudo-classes and links > Pseudo-classes :first-child and :last-child
The first child paragraph of the div element, it will be displayed in green.
The second child paragraph of the div element, it will be displayed in black, because there are no rules for it.
The third child paragraph of the div element, it is also the last child paragraph. The text color will be blue.
Result: