Master pseudo-classes and pseudo-elements: 16 levels of :hover, ::before, :has and :not. The most in-depth CSS pseudo game around.
The ::before pseudo-element makes a stand-in element in front of the element's own content. The content property is required: without content, the pseudo-element does not appear at all.
The ::after pseudo-element works like ::before, but it is placed after the element's own content. Good for adding an icon, a mark or a decoration after the words.
With position: absolute on the pseudo-element and position: relative on its parent, you can place a decoration anywhere: in a corner, on an edge, even a little outside its bounds.