Home
CSS
CSS Pseudo-class
Tryit: Style any p element that is the first child of any element
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 { color: blue; } </style> </head> <body> <p>This is some text.</p> <p>This is some text.</p> <div> <p>This is some text.</p> <p>This is some text.</p> </div> </body> </html>