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

  • 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.

Share on:
Online Certification Guide

About Author

Hey there, its OnlineCertificationGuide here to help you out in your Journey in the study. So my friend share the site with your friends in case I am helpful to you.