How to display only the first two elements from ten same elements September 18, 2022 by Tarik Billa You can css ul li:nth-child(n+3) { display: none; } It’ll not show 3rd and up.