Don't have a portfolio? Create one in our new workshop using React!
Join our free community Discord server here!
Learn React with us!
Get job-ready with our Career Toolbox Track's career advice, resume tips, and more 🧰
🤖 Check out all our AI content here 👀
Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
The :nth-child() pseudo-class targets elements based on their position within a parent element. :nth-child() uses a function-like syntax that accepts a value between the parentheses. The value is referred to as an argument.
We'll focus on two common arguments: the keywords odd and even. Both select every other child element based on an odd or even position.