CSS direct child selector quiz

Question: In following html code, select which text will have green background?

<style>div {background-color:yellow;}
.foo > div {background-color:green;}</style>
<div class="foo">
<div>Hello<div>World</div></div></div>
Answers: [A] Hello [B] Hello World [C] World [D] None

Comments

Click here to write/view comments