Loading

Quipoin Menu

Learn • Practice • Grow

Direction: Choose the correct option

Q1.

div p {
color: blue;
}
What does this selector target?
A. Only first p
B. Only direct child p
C. All div inside p
D. All p inside div
Direction: Choose the correct option

Q2.

div > p {
color: red;
}
What is the difference from div p?
A. Targets only direct children
B. Targets siblings
C. Targets all descendants
D. Targets adjacent elements
Direction: Choose the correct option

Q3.

h2 + p {
font-weight: bold;
}
Which paragraph gets bold text?
A. All paragraphs
B. Only first p in document
C. All p after h2
D. First p immediately after h2
Direction: Choose the correct option

Q4.

h2 ~ p {
color: gray;
}
What does the ~ selector do?
A. All p before h2
B. All p in document
C. All p siblings after h2
D. Only first p after h2
Direction: Choose the correct option

Q5.

Which selector would you use to style only the first list item in an unordered list?
A. ul > li
B. ul li:first-child
C. ul li
D. li:first