Website Developer Question:

Tell me what Is A Class Selector?

Tweet Share WhatsApp

Answer:

In CSS, a class selector is an expression which begins with a full stop (“.”) and followed by the name of a class. The class attribute could be a space-separated list of items, and one of those must match with the class name specified in the selector.

Here is an example which selects a div and modified it style.

.sampleclass {font-family: Ariel; font-size: 10; background: green;}

<div class="sampleclass">....</div>

Download Website Developer PDF Read All 80 Website Developer Questions
Previous QuestionNext Question
Tell me what are a few sites you admire and why?Explain me how Do You Make Border Rounded With CSS3?