<!DOCTYPE html>
<html>
<head>
<title>CSS :last-child Selector</title>
<style type="text/css">
li:last-child {
background:#ff0000;
}
</style>
</head>
<body>
<ul>
<li>first item</li>
<li>second item</li>
<li>third item</li>
<li>forth item</li>
<li>fifth item</li>
</ul>
</body>
</html>