:before, ::before, :after, ::after – :::wut?

Do you know the difference between single and double colon notation in CSS?

“there are now two formats to remember instead of one… some only work with ::, some work with both, now beginner devs need to understand pseudo-classes and pseudo-elements being different terms”

Check out the history:

Know your lingo: pseudo-class vs pseudo-element (September 2017)

Double colon notation: :before versus ::before (May 2007)

Was this post helpful?