next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
next
Round
Technologies
Coding Problems
Bookmarks
Learning Paths
1
How are pseudo-classes different from pseudo-elements?
Intermediate
2
What is a pseudo-class in CSS?
Intermediate
3
Give some commonly used pseudo-classes.
Intermediate
4
What’s the purpose of the :active pseudo-class?
Beginner
5
What is the :focus pseudo-class used for?
Beginner
6
What is the syntax of a pseudo-class in CSS?
Intermediate
7
How does the :visited pseudo-class work for links?
Intermediate
8
What does the :hover pseudo-class do?
Beginner
9
What does the :checked pseudo-class do?
Beginner
10
How does the :disabled pseudo-class behave?
Intermediate
11
How would you use :has() to select a <div> that contains an image?
Intermediate
12
How can you highlight a link only when it’s both focused and hovered?
Intermediate
13
How can you style the first letter of only the first paragraph using pseudo-classes?
Beginner
14
How can you style the parent when any child inside it is focused?
Intermediate
15
How do you hide empty <p> tags using pseudo-classes?
Beginner
16
How can you style alternate table rows without adding extra classes?
Beginner
17
How do you style every third list item differently?
Beginner
18
How can you highlight the current section in a menu using :target?
Beginner
19
How can you style a form field differently when focused and valid?
Beginner
20
How do you change a button’s color when hovered but not when disabled?
Beginner
21
How can you style only the last element of a list using pseudo-classes?
Beginner
22
What does the :lang() pseudo-class do?
Beginner
23
What’s the difference between :nth-child() and :nth-last-child()?
Beginner
24
How can you combine :is() or :where() with other selectors for cleaner code?
Intermediate
25
How does :is() differ from :where() in terms of specificity?
Intermediate
26
How does :has() pseudo-class work, and why is it powerful?
Intermediate
27
Is :has() supported in all browsers?
Intermediate
28
How can you use :not() effectively to exclude elements from styling?
Intermediate
29
What is the specificity of pseudo-classes compared to normal selectors?
Intermediate
30
Can pseudo-classes be chained together? Give an example.
Beginner
31
How can you style a checkbox when it is checked or unchecked?
Beginner
32
How can you style invalid form inputs without JavaScript?
Beginner
33
What is the purpose of the :placeholder-shown pseudo-class?
Beginner
34
What’s the difference between :focus and :focus-visible?
Intermediate
35
How does the :focus-within pseudo-class work?
Intermediate
36
How can you style an input field when it’s autofilled?
Intermediate
37
What does :read-only and :read-write do?
Beginner
38
What is the use of :in-range and :out-of-range?
Beginner
39
What does the :valid and :invalid pseudo-class do?
Beginner
40
How can you use :required and :optional pseudo-classes in forms?
Beginner
41
How can you use :empty to detect empty elements?
Beginner
42
How does the :root pseudo-class differ from the html selector?
Beginner
43
What is the difference between :first-child and :first-of-type?
Beginner
44
How do :nth-child() and :nth-of-type() differ?
Beginner
45
What does the :target pseudo-class represent?
Beginner
46
What is the difference between :link and :visited?
Beginner
47
What does the :not() pseudo-class do?
Beginner
48
How can you use multiple pseudo-classes together?
Beginner
49
How can you style an element when it’s being hovered over along with its child?
Beginner
50
How do you select every odd or even element using pseudo-classes?
Beginner
All Topics
1
Fundamentals
0/5 topics · 0%
Basics
Selectors
Box model
Text formatters
Combinators
2
Positioning & layout
0/4 topics · 0%
Positioning
Display
Overflow
Breakpoint
3
Modern layout
0/5 topics · 0%
Pseudo classes
Pseudo elements
Flexbox
Grid
Transformation and Transition
4
Beyond core
0/2 topics · 0%
Frameworks
Everything else
Share
this topic
Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.