background-color: yellow;
<!DOCTYPE html>
<div>
<p>Paragraph 1 in the div.</p>
<p>Paragraph 2 in the div.</p>
<p>Paragraph 3. Not in a div.</p>
<p>Paragraph 4. Not in a div.</p>
</div>
I want to apply background color for only the first <p></p>
element inside the div.
tried some css selectors,couldn't get the expected result. Can anyone help me?