Home
CSS
CSS Pseudo-class
Tryit: Style all i elements in all first child p elements
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> p:first-child i { color: blue; } </style> </head> <body> <p>I am a <i>strong</i> person. I am a <i>strong</i> person.</p> <p>I am a <i>strong</i> person. I am a <i>strong</i> person.</p> <div> <p>I am a <i>strong</i> person. I am a <i>strong</i> person.</p> <p>I am a <i>strong</i> person. I am a <i>strong</i> person.</p> </div> </body> </html>