Table of Content

CSS MCQ : Descendant Selectors (Multiple Choice Questions)


Question 1
In Descendant Selector , style is applied to element based on ________ .
A
whether element have sub element or not.
B
whether element have only 2 sub elements or not
C
whether element is of particular type or not
D
None of These
Question 2
Following Style is applied to -
div.wrapper h2 {
    font-size: 18px;
    margin-top: 0;
}
A
Type 2 Heading inside Element div of class wrapper.
B
Type 2 Heading inside Element div with id wrapper.
C
Type 2 Heading inside Element div of any class
D
None Of These
Question 3
Following Style is applied to -
.wrapper sub#h2 {
    font-size: 18px;
    margin-top: 0;
}
Select appropriate option(s).
A
Div Element with class wrapper and Type 2 Heading inside it with ID sub.
B
Type 2 Heading with ID sub inside Element P with class wrapper
C
Type 2 Heading inside wrapper with ID sub
D
All of the above
There are 3 questions to complete.