5 - Selectors
5 - Selectors
Element Selectors:
Class Selectors:
ID Selectors:
Attribute Selectors:
Attribute selectors use square brackets (`[]`) with different operators and
values.
7 Selectors
Pseudo-classes:
`:hover`, `:first-child`).
Common examples:
Pseudo-elements:
Common examples:
Child Selector:
Targets elements that are direct children of a specific element. It
uses the greater-than sign (>) to separate the parent and child
elements.
For example:
.container > p {
color: red;
}
14 Selectors
Questions?