Which pseudo-class targets the **first child** of a parent element?
A
:first B
:first-child C
:start D
:begin
Analysis & Theory
`:first-child` targets the **first child element** of its parent.
What does the `:hover` pseudo-class do?
A
Applies styles when an element is clicked B
Applies styles when an element is focused C
Applies styles when a user hovers over an element D
Applies styles when an element is inactive
Analysis & Theory
`:hover` applies styles when the user moves the pointer over the element.
Which pseudo-class is used to style a link that has been visited?
A
:hover B
:visited C
:active D
:focus
Analysis & Theory
`:visited` applies to links the user has already clicked and visited.
What does `:nth-child(2)` select?
A
Every second type of element B
The second child of its parent C
Every even element D
Elements that appear after the second
Analysis & Theory
`:nth-child(2)` selects the **second child** of its parent, regardless of type.
Which pseudo-class applies when a form input is focused?
A
:checked B
:focus C
:hover D
:enabled
Analysis & Theory
`:focus` applies styles when a form field or link is focused (clicked or tabbed into).
Which pseudo-class targets only **enabled** form elements?
A
:active B
:enabled C
:checked D
:valid
Analysis & Theory
`:enabled` applies to input fields that are currently usable (not disabled).
What does the `:not(selector)` pseudo-class do?
A
Selects only elements that match the selector B
Ignores the matching elements C
Applies to elements that do not match the selector D
Removes all styles
Analysis & Theory
`:not()` excludes elements that match the given selector.
Which pseudo-class applies to a checkbox or radio button that is selected?
A
:selected B
:focus C
:checked D
:enabled
Analysis & Theory
`:checked` applies to checkboxes and radio buttons that are selected.
What does `:last-child` select?
A
The last element in the page B
The last child of its parent C
All children except the last D
The last of a specific type
Analysis & Theory
`:last-child` selects the last child element of its parent.
Which pseudo-class applies when a link is being clicked?
A
:hover B
:visited C
:active D
:checked
Analysis & Theory
`:active` applies styles during the moment an element is being clicked.