<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");
This Pen doesn't use any external CSS resources.