Simplify your code with this underused pseudo-class

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

ShortIntermediateUI1 min

About this video

A short CSS tutorial showing how the :empty pseudo-class can simplify styling for elements that have no content.

What you’ll learn

  • Target empty elements with the :empty pseudo-class