JSFiddle - React, Tailwind, and code Playground
HTML
<div class="ban_hdr">
<p>
Which of the following are correct? abc abc
<p>Test this code</p>
</p>
<p>Which of the following are correct? pqr pqr</p>
</div>
JavaScript
alert($('div.ban_hdr > p').size());