How to select an element that has a certain class with CSS? Spread the love To select an element that has a certain class with CSS, we use a period. For instance, we write .myClass { color: green; } to select the elements with class myClass with .myClass. Related