CSS Selectors
1 min readOct 1, 2020
Lets start with the Regular selectors
1 — Element Selector
input{ … }
div{ … }
2 — Class Selector
.myclass{ … }
.anotherclass{ … }
3 — Id Selector
#myid{ … }
#anotherid{ … }
Priority of Selectors
Inline Style > Id > Class > Element
Lets see in action:
Advanced Selectors
(*) Universal Selector
It selects, well, everything! …but not the pseudo-elements ::after and ::before
*{ … }
.myclass *{ … }
To be continued…