JS Party: JavaScript, CSS, Web Development cover image

A very !important lesson

JS Party: JavaScript, CSS, Web Development

CHAPTER

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.

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner