CSS Selectors Test

Test your ability to target elements with combinators, attributes and functional pseudo-classes.

6 questions. Choose the best answer for each question, then review every explanation.

Question 1 of 6

1 of 6
Question 1What does the child combinator select?
.menu > li
Question 2What does the adjacent sibling combinator select?
h2 + p
Question 3Which selector matches required input elements?
Question 4Which selector targets every odd list item?
Question 5Why is :focus-visible often preferable to :focus for custom focus rings?
Question 6What does this selector exclude?
button:not([disabled])