1. Home
  2. Css
  3. Pseudo class :empty

This pseudo class matches an element that has no children. Whitespace is considered as a child, so if you have an element with a space inside, it will not be considered empty.

#css#pseudo-class
:empty {
    display: none;
}
copy
Full Css cheatsheet