To apply a style to only the direct children elements of a container, you would use the ________ combinator.
- adjacent sibling combinator
- child combinator
- descendant combinator
- general sibling combinator
The correct answer is the child combinator (>), which selects only the direct children of a particular element. This ensures that the style is applied exclusively to the immediate children of the specified container, not including nested elements.
Loading...
Related Quiz
- In Flexbox, how would you align all items to the center of the container both vertically and horizontally?
- What is the primary purpose of the filter property in CSS?
- In a flex container, what is the effect of setting the align-items property to baseline?
- The ________ CSS selector is used to select the first paragraph inside a container.
- What is the main purpose of using vendor prefixes in CSS?