Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> p:only-of-type { background: #1c87c9; } </style> </head> <body> <h2>:only-of-type selector example</h2> <div> <p>Lorem ipsum is simply dummy text.</p> </div> <div> <p>Lorem ipsum is simply dummy text.</p> <p>Lorem ipsum is simply dummy text.</p> </div> </body> </html>