HTML CSS examples for CSS Selector:nth-child
Target first 5 nth children using :nth-child(n+2)::before
<html> <head> <style> a {<!-- w w w . j a v a 2 s . c om--> display:block; } a:nth-child(n+1)::before { content:"? "; } a:nth-child(n+2)::before { content:"?? "; } a:nth-child(n+3)::before { content:"??? "; } a:nth-child(n+4)::before { content:"???? "; } a:nth-child(n+5)::before { content:"????? "; } </style> </head> <body> <a href="#">Lore</a> <a href="#">Lore</a> <a href="#">Lore</a> <a href="#">Lore</a> <a href="#">Lore</a> </body> </html>