CSS :empty Selector

HTML Code

<!DOCTYPE html>
<html>
<head>
<style>
p:empty {
width: 100px;
height: 20px;
background: #ff0000;
}
</style>
</head>
<body>

<p></p>
<p>A paragraph.</p>
<p>Another paragraph.</p>

</body>
</html>

HTML View

A paragraph.

Another paragraph.

If you want to join my online or offline graphic designing course than just call me - 9334029817

Related Posts

Leave a Reply