CSS CSS Basics Basic Selectors Reusing Classes

Clinton Hays
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Clinton Hays
Front End Web Development Techdegree Graduate 16,105 Points

Multiple selectors vs. Multiple classes

Is there a preference for using multiple classes in your html vs using multiple selectors for the same rul in your css file?

I would prefer to code something like this:

.primary-content, .secondary-content, #main-footer{ border-top: 2px solid lightgrey; }

To me that seems more explicit than a special class, and also keeps me from having to add extra code into my html. However, I'm still fairly new to html and css having only made a handful of projects, so I am aware I may be missing something important.

TIA!