Examples
* {
} Universal Selector: It selects all the elements
#id_name{
} Id selector: It selects only the elements with ID
.class_name{
} Class selector: It selects only element with Class name
Also,
<textbox type="text">
<textbox type="password">
Here, if we want to select only password attribute then
textbox[type="password"]{
}
a:first-child{
} It selects the first a tag (~ a:last-child)
a:nth-child(2n){
} Select even numbered anchor tag i.e. 2,4,6...
Heading
In this above element: Content is Heading And after content there is padding which is transparent gap between content and border Then comes border whose thickness can be changed by css shorthand property border And finally comes margin which is the gap outside the border to other element
4. [Specificity](https://blog.webdevsimplified.com/2020-02/css-specificity/)
It means what CSS styles will be applied or override in case of multiple styles on same element In layman’s term: !important > Inline CSS > #id > .class > element example: h1 { color: blue !important; } h1 { color: green; } Here, blue will be applied on h1 ```
1.Easy
2.Medium
3.Hard