A div with class="example"
Another div with class="example"

This is a p element with class="example".

This is a span element with class="example" inside another p element.

Click the button to change the background color of all elements with class="example".

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