Remove empty elements with one line of CSS - great for dynamic content

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 Kevin Powell tutorial on using the CSS :empty pseudo-class with one line of CSS to handle empty elements in dynamic content.

What you’ll learn

  • Hide empty HTML elements with the CSS :empty selector