Selectors are used to "find" (select) HTML elements based on their tag name, id, classes, types, attributes, values of attributes and much more.
A list of all selectors can be found in our CSS Selector Reference.
Example
Type Selector:-
p{
color : red;
}
Class Selector:-
.head{
color:green;
}
Id Selector:-
#Box{
color: yellow;
}
Universal Selector:-
*{
margin:0;
padding:0;
}
p{
color : red;
}
Class Selector:-
.head{
color:green;
}
Id Selector:-
#Box{
color: yellow;
}
Universal Selector:-
*{
margin:0;
padding:0;
}
No comments:
Post a Comment