Adjacent sibling combinator
HTML
<div class="test">
<h1>
this is one
</h1>
<h1>
this is two
</h1>
<h1>
this is three
</h1>
<p>
this is first p tag
</p>
</div>
CSS
.test h1 + h1 + h1{
color: red;
}
.test h1~p{
color: blue;
}
<div class="test">
<h1>
this is one
</h1>
<h1>
this is two
</h1>
<h1>
this is three
</h1>
<p>
this is first p tag
</p>
</div>
.test h1 + h1 + h1{
color: red;
}
.test h1~p{
color: blue;
}