CSS types of selectors


Types of selectors in CSS:
1. Tag selector
2. Class selector
3. ID selector
4. Group selector
5. Contextual selector
a. Descendent selector
b. Child selector
c. Adjacent sibling selector
d. General sibling selector
6. Attribute selector
7. Pseudo classes
8. Pseudo elements
9. Universal selector

Why different types of selectors?
To select html elements in an efficient way and provide more control over selection of html elements, CSS provides various types of selectors. Selectors allow us to locate or select html elements on the page as much as generically and as much as specifically and apply styles on them.

In the upcoming few video tutorials we are going to discuss all these above types of selectors in detail.

What are they? When to use them? and How to use them? I suggest you guys to watch and understand very carefully.

For creating well designed web sites, we should be able to select html elements on the web page as much as efficiently as possible and apply styles on them.

Interview Questions: