Pseudo-class selectors nth child


#1

p:first-child {
color: red;
font-family: cursive;
}

p:second-child(2) {
font-family: Tahoma;
}

p:third-child(3) {
color: #CC0000;
}

p:fourth-child(4) {
background-color: #00FF00;
}

p:fifth-child(5) {
font-size: 22px;
}

Do you see problem?


#2

second-child, third-child, fourth-child and fifth-child are invalid pseudo classes

the correct pseudo class is nth-child, then there are several special ones (first-child and last-child are the ones taught in the course)


#3

thanks’ I understand my problem


#4