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>
    f</p>f
<p>Which of the following are correct? pqr pqr</p>f
</div>

JavaScript

alert("|" + $('div.ban_hdr > p')[2].innerHTML + "|");