<div class="head">
<div>
<p>
<div>div5</div>
div4
</p>
<div>div6</div>
div1
</div>
<div>
div2
</div>
<div>
div3
</div>
</div>
.head > div:nth-child(2){
color: red
}
div:first-child{
color: blue
}
.head > div:last-child{
color: green
}
.head p:nth-of-type(1){
color: grey
}