Lesson

DOM Hierarchy Pseudo Classes :first-child :last-child :nth-child (demystified)

DOM hierarchy pseudo-classes allow you to style specific elements based on where they fall in the hierarchy and what type of elements they are. You can also use :nth-child to target custom element patterns, like every other element.

Duration
3 min
Access
Free
Transcript
Available

DOM hierarchy pseudo-classes allow you to style specific elements based on where they fall in the hierarchy and what type of elements they are. You can also use :nth-child to target custom element patterns, like every other element.