Course lesson

Target Custom HTML Element Patterns with DOM Hierarchy Pseudo Classes in CSS

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 (odd or even).

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 (odd or even).