Prev Demo
CSS3
>
Nth-Child Selector
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <style> p:nth-child(3) { background-color: lightblue; color: blue; } </style> <body> <p>The first Child.</p> <p>The second Child.</p> <p>The third Child.</p> <p>The fourth Child.</p> </body> </html>
Note: We DO NOT save your trial code in our database.
Output