css nth-of-type vs nth-child w3school code example Example: child css p:nth-child(2) { background: red; }