Yo ninjas, once again! I’m here with another CSS tutorial for beginners, and this time we’re going to be getting familiar with the nth-child pseudo classes. They are you new best friend, trust me. If there’s one structural pseudo class you should master, it’s this one! Nth-child selectors help us target any child of a parent element based on it’s position within the HTML structure. It is an awesome technique, and one that I hope you will enjoy using on your own projects. Stay cool, keep coding & peace, my friends :).


========== CSS for Beginners Playlist ==========
========== HTML Basics Course ==========

========== The Net Ninja ============

For more front-end development tutorials & to black-belt your coding skills, head over to – or

========== Social Links ==========

Twitter – @TheNetNinja –


  1. HI Shaun, are you aware of any logical explanation as to the indexing method here? In JS we've learned that the first element of a list would be index 0, which makes sense really given how computers function behind the scenes. And now suddenly however here comes the nth child selector, telling us the first element is in index 1? A bit confused if I'm honest


Please enter your comment!
Please enter your name here