A heading in div

A p element in div.

Another p element in div.

A p element with class="example" in div.

Click the button to add a background color to all p elements inside DIV.

Note: The querySelectorAll() method is not supported in Internet Explorer 8 and earlier versions.