Edit This Code:
<!DOCTYPE html>
<html>
<head>
<style>
p:only-of-type {
    background: #ff0000;
}

</style>
</head>
<body>

<div><p>This is a paragraph.</p></div>

<div><p>This is a paragraph.</p><p>This is a paragraph.</p></div>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy