Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> p:nth-last-of-type(3) { background: #8ebf42; } </style> </head> <body> <h2>:nth-last-of-type() selector example</h2> <p>Paragraph 1</p> <p>Paragraph 2</p> <p>Paragraph 3</p> <p>Paragraph 4</p> <p>Paragraph 5</p> <p>Paragraph 6</p> </body> </html>