Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> em:only-child { background-color: #8ebf42; } </style> </head> <body> <h2>:only-child selector example</h2> <p>This is a <em>paragraph</em>.</p> <p>This is a paragraph.</p> </body> </html>