JS Party: JavaScript, CSS, Web Development cover image

A very !important lesson

JS Party: JavaScript, CSS, Web Development

00:00

Is the Has a Parent Selector?

The has is not actually a parent selector. It's called a relative selector because it chooses things other than parents. You could with CSS say, if this H2 has three sibling H2s, right after it, then style it this way. So you could before by doing H2 and last of type 3N plus one,. That would basically say N for last of type N plus three. But it could only be if it was all the same type. All H2s can do that too.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app