Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

CSS Selectors in Depth

CSS Selectors in Depth

Autoplay

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

    cssCSS

    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).