Why do some classes start with points and others don’t?

Asked

Viewed 23 times

0

In CSS, when defining class H2, for example, it does not start with dot:

H2 { color: red; }

But other classes need the point:

.text-red { color:red; }

Why does this happen?

  • @Bacco when it is so, it is better to answer or let the user query the old answer, because this will be deleted?

  • 1

    Without the point vc is applying to an html element H2 directly and not necessarily the class

  • 1

    @hugocsl the ideal is to vote for closing by duplicate (if you have enough score), because this one becomes link to the original. If you have something to add, it pays to post one more reply in the original as well, instead of this one.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.