Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style> 
p:nth-last-child(2) {
  background-color: red;
} 
</style>
</head>
<body>
<h1>Demo of nth-last-child()</h1>
<p>The first paragraph.</p>
<p>The second paragraph.</p>
<p>The third paragraph.</p>
<p>The fourth paragraph.</p>
</body>
</html>