CSS selectors
1 Element Selector
h3 {
/* write your css */
}
2 Id Selector
#head {
/* write your css */
}
3 Class Selector
.head-title {
/* write your css */
}
4 Attribute Selector
ol[type="a"] {
/* write your css */
}
5 Descendant Selector
div .card-title {
/* write your css */
}
6 Universal Selectors
* {
/* write your css */
}
7 Nth type of Selector
div:nth-of-type(2) {
/* write your css */
}
8 Pseudo-class Selector
*The syntax of pseudo-class:*
selector:pseudo-class {
property: value;
}
Example:
a:hover {
/* write your css */
}
Top comments (0)