Which CSS3 code fragment styles an H2 element only if it is a direct child of a DIV element?

Which CSS3 code fragment styles an H2 element only if it is a direct child of a DIV element?
A. h2 >div {background-color: #900;}
B. div, h2 {background-color: #900;}
C. div {background-color: #900;}h2 {background-color: #900;}
D. div > h2 {background-color: #900;}

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.