CSS selectors
css selectors are used to select the html elements you want to style.
there are four types of selectors.
- simple selectors(select elements based on name, id, class)
- Combinator selectors(select elements based on a specific relationship between them)
- Pseudo-class selectors(select elements based on a certain state)
- Pseudo-elements selectors(select and style a part of an element)
- Attribute selectors(select elements based on an attribute or attribute value)
Simble selectors
simble selectors select elements based on name,id,class.
below are the pic of the simple selectors.
Combinator selectors
Combinator selectors select elements based on a specific relationship between them.
Below is the pic of the Combinator selectors.
Pseudo-class selectors
Pseudo-class selectors select elements based on a certain state.
Below is the some frequently used pseudo-class selectors.
Pseudo-elements selectors
pseudo-elements selectors select and style a part of an element.
Attribute selectors
attribute selectors select elements based on an attribute or attribute value.
Mind map
online demo
you can click here to see the deom for better understanding
click here