Sublime Text
<!DOCTYPE html> <html> <head> <style type="text/css"> p:nth-last-of-type(odd){ border:1px solid black; } p:nth-last-of-type(even){ border:1px solid red; } </style> </head> <body> <p>- Lập Trình Web 01</p> <p>- Lập Trình Web 02</p> <div>- Lập Trình Web 03</div> <span>- Lập Trình Web 04</span> <h4>- Lập Trình Web 05</h4> <p>- Lập Trình Web 06</p> <p>- Lập Trình Web 07</p> </body> </html>
<!DOCTYPE html> <html> <head> <style type="text/css"> p:nth-last-of-type(odd){ border:1px solid black; } p:nth-last-of-type(even){ border:1px solid red; } </style> </head> <body> <p>- Lập Trình Web 01</p> <p>- Lập Trình Web 02</p> <div>- Lập Trình Web 03</div> <span>- Lập Trình Web 04</span> <h4>- Lập Trình Web 05</h4> <p>- Lập Trình Web 06</p> <p>- Lập Trình Web 07</p> </body> </html>