Pseudo-Classes
Target a specific state (eg. hover)
a:hover {} /* hover */
a:visited {} /* visited link */
Pseudo-Element
Target a part of a element (eg. first letter)
p::first-letter {}
Example is to make the first paragraph of something different style
p:first-of-type {}
- the first paragraph and only the first will have the style applied
p:first-child {}
- the first element in a section and has to be a
p
tag
These pseudo classes and elements can be combined
p:first-of-type::first-letter {}