What is the difference between :nth-child() and :nth-of-type()?

:nth-child() targets the nth child regardless of type, while :nth-of-type() targets the nth child of a specific type.