Code Editor
Web Browser
Classes, IDs, & Divs

Multiple Selectors: CSS

CSS does not limit you to selectors that target a single element or class.

In a previous exercise, you learned how to use a multiple element selector to style multiple elements at once.

h1, p { font-family: Garamond, serif; }

The same syntax can be used to style multiple classes at once.

.first, .last { font-size: 20px; }

Using a multiple class selector is an efficient way of styling multiple HTML elements.

Report a Bug
If you see a bug or any other issue with this page, please report it here.