Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> li:first-child { background: #8ebf42; } </style> </head> <body> <h2>:first-child selector example</h2> <ul> <li>Paris</li> <li>Moscow</li> <li>Rome</li> </ul> <ol> <li>Paris</li> <li>Moscow</li> <li>Rome</li> </ol> </body> </html>