What i'm trying to do is add a border-radius to the last p of every "block" of p's so before the next h1, I can add the top radius using the + selector but can't figure out how to select the last one of each.
<main>
<h1>test</h1>
<p>hello</p>
<h1>test</h1>
<p>hello</p>
<p>hello</p>
<p>hello</p>
<h1>test</h1>
<p>hello</p>
<p>hello</p>
<h1>test</h1>
<p>hello</p>
<p>hello</p>
<h1>test</h1>
<p>hello</p>
</main>
css
<style>
p {
background: black
}
h1 + p {
border-top-left-radius: 1rem;
border-top-right-radius: 1rem;
}
</style>