Sometimes, we want to get a specific number child using CSS.
In this article, we’ll look at how to get a specific number child using CSS.
How to get a specific number child using CSS?
To get a specific number child using CSS, we use the nth-child
selector.
For instance, we write
td:nth-child(2)
to select the 2nd td element.
And
td:nth-child(3)
to select the 3rd td element.
Conclusion
To get a specific number child using CSS, we use the nth-child
selector.