1.

What is a class selector?

Answer»

Class selector is a TYPE of CSS selector that selects HTML elements using specific class attributes. The class is defined to apply the same styles to different elements. Class selectors are a good choice if you want to apply common styles like font family, color, etc. to multiple elements.

Class selectors are REPRESENTED as .idName.

For EXAMPLE, the below HTML element will have the class selector as ‘.post’

<div class=“post”&GT; This is a post </div>


Discussion

No Comment Found