<div>
    <p>W3TR</p>
    <p>W3TR</p>
    <p>W3TR</p>
</div>
<div>
    <span>W3TR</span>
    <p>W3TR</p>
    <p>W3TR</p>
</div>
$("p:nth-child(2)").css("background-color", "red");

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js