Utilizing the :nth-child Selector in CSS


Select elements based on their order in a parent element with the :nth-child pseudo-class.

Source Code

p:nth-child(2) {
    color: red;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments