Learn CSS Colors by Building a Set of Colored Markers

So on the index.html, the div contains

class=“marker red”

And on the styles.css, the .class is
.red {


}

Why do I not have to include the value word ‘marker’?

You can’t able to select marker and red in same time, that’s Way your CSS will not work.

Thanks for reply,

I meant that on css, why do i only type in ‘red’ when on html, class is ‘marker red’?
Do I not have to include ‘marker’ on selector?

In HTML, when you assign two values as a class in an element, it allows you to apply styles from both classes to that element. This is useful for situations where you want to combine styles from multiple classes without having to duplicate code or create a new class. For example, if you have one class for styling the font color and another for styling the background color, you can apply both classes to an element to achieve both effects simultaneously.