Question With css and selectors exercise 8

<Below this line, add a link to the EXACT exercise that you are stuck at.>

im not having problems, just a question. The exercises asks us to create a multiple class attribute by creating a “title uppercase” within one class attribute. i don’t really understand what the purpose of this is, why can’t i just utilize the singular .title class by itself and just apply all the styling within that .title class instead of creating .title and .uppercase?
It’s the same end result for both paths in regards to styling, sorry i am just confused.

 **<h1 class="title uppercase">Top Vacation Spots</h1>**
**  <h5>By: Stacy Gray</h5>**
**  <h6>Published: 2 Days Ago</h6>**

**.title {**
**  color: teal;**

**.uppercase {**
**  text-transform:uppercase;**

Why can't i just do

<h1 class="title"> Top Vacation spots </h1>

.title {

for this scenario yes, but you might want to give other elements a uppercase, but not a teal color, so having a separate class can have its advantage.

The trick is always to balance this things, when should you use two classes or one class with all the rules? This depends on the rest of your intention/design of your program


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.