You can use the :empty
pseudo-class selector in CSS to target elements that don't have any content:
/* Selects span elements that don't have any content */
span:empty {
...
}
Copied to clipboard!


Resources:
Remove ads📚 Get access to exclusive content
Want to get access to exclusive content? Support webtips with the price of a coffee to get access to tips, checklists, cheatsheets, and much more. ☕
Get access