HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> p:nth-last-of-type(3n+0){ color: red; } </style> </head> <body> <h1>CSS :nth-last-of-type() Selector</h1> <p>This is 6th paragraph child of its parent (body) from bottom.</p> <p>This is 5th paragraph child of its parent (body) from bottom.</p> <p>This is 4th paragraph child of its parent (body) from bottom.</p> <p>This is 3rd paragraph child of its parent (body) from bottom.</p> <div> This is Div </div> <p>This is 2nd paragraph child of its parent (body) from bottom.</p> <p>This is 1st paragraph child of its parent (body) from bottom.</p> </body> </html>
OUTPUT
×

Save as Private