List different selectors available in CSS and explain in detail
Answer:
Different types of CSS selector are
- Universal Selector
- Element Type Selector
- Class Selector
- Id Selector
Universal Selector
It selects all the elements in the Html file.
Example
*{
color:red;
font-size:20px;
}
Element Type selector
It will select respective element like img,a,ul,li,th etc
Example
ul{
color:red;
}
p{
font-size:20px;
}
Id Selector
It will select based on id.we have to add #(hash) at the beginning of id to use id selector.
Example
#id1{
color:green;
}
#abc{
color:red;
}
Class Selector
It will Select Based on class.we have to add . (dot) at the beginning of class to use a class selector.
Example
.class1{
color:blue;
}
.xyz{
color:red;
}
Other Question With Answer
Other Question With Answer
Amazing!
ReplyDeleteGreat Article IoT Projects for Students
DeleteDeep Learning Projects for Final Year
JavaScript Training in Chennai
JavaScript Training in Chennai
The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training
I like this site very much, Its a really nice situation to read and get info . ny web design firms
ReplyDeleteYour home is valueble for me. Thanks!? This web page is really a walk-via for all of the information you needed about this and didn know who to ask. Glimpse right here, and you l definitely uncover it. web design agency new york
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI discovered your blog site internet site on the internet and appearance some of your early posts. Continue to keep in the great operate. I just now additional increase your Rss to my MSN News Reader. Seeking toward reading far more from you finding out at a later date!… best branding agencies san francisco
ReplyDeleteChaga mushroom coffee been recently brought to plenty of everything about simply because of the Ukrainian article author Alexandr Solzhenitsyn by it’s new ‘Cancer Ward’ in which traditional qualities is generally cured of a tumors on the help consume. Siberian Chaga ux agency san francisco
ReplyDelete