Pseudo-class selectors nth child


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?


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)


thanks’ I understand my problem