What are Selector in CSS :-
Selectors help to select an element to which you want to apply a style. For example below is a simple style called as ‘intro” which applies red color to background of a HTML element.
Ex-
<style>
.intro
{background-color:red;}
</style>
To apply the above “intro” style to div we can use the “class” selector as shown in the below figure.
<div class="intro">
<p>
My name is Shivprasad koirala.
</p>
<p>
I write interview questions.
</p>
</div>