Class attribute styling

I’m on typography lesson 41 and this is the code:

<div class ="small-text"

My question is how is the class attribute styling the font. For instance the "small-text actually makes the text in appear in small caps. How is the attribute itself styling the font? Im utterly confused I thought I had to use selectors to style the font.

The class has been styled somewhere in your CSS code.

.small-text {
  font-size: 0.85rem;
}

And I guess that’s why it took the font-size properties. .small-text itself cannot style the element except in the case where you’re using Bootstrap or Tailwind CSS. Even in the mentioned cases, it’s used as text-sm, text-xl, text.ig and not small-text. Have I answered your question?