Which symbol groups selectors? (A) Comma (B) Space only (C) Hash (D) Slash. Answer: A. Commas separate selector lists.
What does .box p match? (A) Descendant paragraphs (B) Only direct children (C) Every heading (D) IDs only. Answer: A. The space is the descendant combinator.
Which combinator selects direct children? (A) + (B) > (C) ~ (D) ,. Answer: B. The child combinator is greater-than.
Which combinator selects the immediately following sibling? (A) + (B) > (C) ~ (D) *. Answer: A. The adjacent sibling combinator is plus.
Which combinator selects subsequent siblings? (A) # (B) . (C) ~ (D) :. Answer: C. The tilde selects subsequent siblings.
Does a descendant need to be a direct child? (A) Yes (B) No (C) Only for divs (D) Only with IDs. Answer: B. Descendants can be nested at any depth.
Does .card > p match a paragraph nested inside another div within the card? (A) Yes (B) No (C) Only with !important (D) Always. Answer: B. The paragraph is not a direct child of the card.
Can grouped selectors share declarations? (A) Yes (B) No (C) Only with JavaScript (D) Only in print CSS. Answer: A. A comma-separated selector list shares a rule block.
What must be true for h2 + p to match? (A) The paragraph immediately follows the h2 as a sibling (B) The paragraph is inside the h2 (C) Both have the same ID (D) The p is a descendant anywhere. Answer: A. They must be adjacent element siblings.
What do sibling combinators require? (A) A shared parent (B) Identical classes (C) Identical IDs (D) A shared CSS file. Answer: A. Siblings share the same parent element.
Key Takeaways
Use commas to group selectors.
A space selects descendants; > selects direct children.
Plus selects an adjacent sibling; tilde selects subsequent siblings.
Rate this course
No ratings yet — yours can be the first.
Stars show on this course. Your written note stays private.