What is empty in CSS?

How to use empty css selector?

CSS :empty is the pseudo-class selector. If you will use any element and left any text or content then it will be an empty element. Also, If we are using comment in the any element then it will show as an empty element. below is the code for the css empty class.


        p:empty {
        div:empty {
        <p>I am paragraph.</p>
        <p>Other paragraph.</p>
        <div>Learn anything</div>
        <div><!-- this is html comment  --></div>

No comments:

Note: Only a member of this blog may post a comment.

Copyright Reserved to Anything Learn. Powered by Blogger.