Before and After pseudo elements explained - part one: how they work

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

BeginnerUI9 min

About this video

Explains what the CSS ::before and ::after pseudo-elements are, how to use them, and why they use a double colon. Covers the need to define the content property for them to appear. Part one of a three-part series for web developers learning CSS.

What you’ll learn

  • Explain what the ::before and ::after pseudo-elements are
  • Use the content property to make pseudo-elements render
  • Describe why pseudo-elements use a double colon