Website Developer Question:

Download Job Interview Questions and Answers PDF

Tell me what Is A Class Selector?

Website Developer Interview Question
Website Developer Interview Question

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 Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me what are a few sites you admire and why?Explain me how Do You Make Border Rounded With CSS3?