:empty

The :empty pseudo-class represents any element that has no children at all. Only element nodes and text (including whitespace) are considered. Comments or processing instructions do not affect whether an element is considered empty or not.

<!DOCTYPE html>
<html>
    <head>
        <style>
            p:empty {
                width: 100px;
                height: 20px;
                background:#009;
            }
        </style>
    </head>
    <body>
        <p></p>
        <p>
            A paragraph.
        </p>
        <p>
            Another paragraph.
        </p>
    </body>
</html>