Which one is the better way to select the child div in following HTML code in terms of performance and optimizations?
Options 1:
<div class="parent-div">
<div></div> <!--- child DIV !--->
</div>
// CSS
.parent-div > div {
// Some CSS for child div
}
'
Options 2: (selecting using a className/id)
<div class="parent-div">
<div class="child-div"></div>
</div>
// CSS
.child-div {
// Some CSS for child div
}