Edu
Hub
Courses
AI Tools
Leaderboard
Login/Register
AR
Abdullah Rashid
abdullah@example.com
Navigation
📚
Courses
🏆
Leaderboard
✨
AI Tools
←
CSS Selectors Mastery Quiz
⏱
15:00
Quit
0 / 20 answered
0%
CSS Selectors Mastery Quiz
10 questions · Medium difficulty · 00:20:00 min
🔥 In Progress
Question 1
Which CSS selector selects elements with a specific class attribute?
*
element
.class
#id
Question 2
What does the descendant combinator (space) select?
All descendants at any depth
Immediately adjacent siblings
Direct child elements
Elements with the same parent
Question 3
Which pseudo-class selects an element that is the first child of its parent?
:first-of-type
:only-child
:first-child
:nth-child(1)
Question 4
How do you select all <a> elements with a 'target' attribute?
a:target
a.target
a[target]
a#target
Question 5
What does the '>' combinator select?
All descendants
General siblings
Immediately adjacent siblings
Direct child elements
Question 6
Which pseudo-class selects an element when it is being hovered over?
:hover
:focus
:active
:visited
Question 7
What does the attribute selector [type^='text'] match?
Elements with type ending with 'text'
Elements with type starting with 'text'
Elements with type exactly 'text'
Elements with type containing 'text'
Question 8
Which selector selects all elements that are not a specified element?
:not(element)
:exclude(element)
:except(element)
:no(element)
Question 9
What does the '~' combinator select?
Direct child
Immediately adjacent sibling
General sibling (any later sibling)
All descendants
Question 10
Which pseudo-class selects the root element of the document?
:root
:document
:base
:html
Question 11
How do you select all elements with a class 'intro' inside a <div>?
div .intro
.intro div
div.intro
div > .intro
Question 12
What does the ':nth-child(odd)' pseudo-class select?
Every child
The first child
Even-numbered children
Odd-numbered children
Question 13
Which selector selects the element with id 'header'?
#header
header
*header
.header
Question 14
What does the attribute selector [href$='.pdf'] match?
Links with href ending with '.pdf'
Links with href exactly '.pdf'
Links with href starting with '.pdf'
Links with href containing '.pdf'
Question 15
Which pseudo-class selects an element that is checked (e.g., a checkbox)?
:selected
:enabled
:disabled
:checked
Question 16
What does the '+' combinator select?
Direct child
Immediately adjacent sibling
All descendants
General sibling
Question 17
How do you select all <li> elements that are the first child of their parent?
li:first-child
li:first-of-type
li:nth-child(1)
li:only-child
Question 18
What does the ':empty' pseudo-class select?
Elements that are invisible
Elements with no children
Elements with no content or whitespace
Elements with zero height
Question 19
Which selector selects all elements with the same parent and immediately after a <p>?
p > *
p + *
p ~ *
p *
Question 20
What does the attribute selector [class~='feature'] match?
Class attribute exactly equal to 'feature'
Class attribute containing 'feature' as a whole word
Class attribute ending with 'feature'
Class attribute starting with 'feature'
✅ Answered:
0
⬜ Unanswered:
8
📊
20%
done
Submit Answers →