Styling First and Last Child in CSS


Specifically style the first and last child of an element.

Source Code

ul li:first-child {
    font-weight: bold;
}
ul li:last-child {
    font-style: italic;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments