What does the following code example do? .caption { background-color: #ffffff; }

Coding For Designers
  • Sets the background color of the <caption> tag to white
  • Sets the background color of any tag with <caption=”true”> to white
  • Sets the background color of any tag with <class=”caption”> to white
  • Sets the background color of any tag with <id=”caption”> to white

EXPLANATION

The CSS class selector .caption will set the background color of any tag to white because CSS class selectors match an element based on the contents of the element’s class attribute.

Leave a Reply

Your email address will not be published. Required fields are marked *