next
Round
Technologies
Experiences
Contribute
Login
next
Round
Technologies
Experiences
Contribute
Login
Question Loading...
Combinators
1. What are CSS combinators? How many types of CSS combinators are there?
Level: Expert | Frequency: High
2. What is the purpose of using combinators in CSS?
Level: Expert | Frequency: High
3. Can you list all the types of CSS combinators?
Level: Expert | Frequency: High
4. What is the syntax for a combinator selector?
Level: Expert | Frequency: High
5. What is the descendant combinator in CSS?
Level: Expert | Frequency: High
6. How does the descendant combinator differ from a direct child combinator? Write an example of a descendant combinator selector. What is the impact of using multiple descendant selectors in a chain?
Level: Expert | Frequency: High
7. How can overusing descendant combinators affect performance?
Level: Expert | Frequency: High
8. How is the child combinator different from the descendant combinator?
Level: Expert | Frequency: High
9. Write an example using the child combinator.
Level: Expert | Frequency: High
10. Can the child combinator select a grandchild element? Why or why not?
Level: Expert | Frequency: High
11. When would you prefer to use the child combinator instead of the descendant combinator?
Level: Expert | Frequency: High
12. Can the adjacent sibling combinator select multiple elements? Write an example using the adjacent sibling combinator.
Level: Expert | Frequency: High
13. How does the adjacent sibling combinator (+) differ from the general sibling combinator (~)? What is the general sibling combinator (~) used for?
Level: Expert | Frequency: High
14. When would you use the general sibling combinator (~) instead of the adjacent sibling combinator (+)?
Level: Expert | Frequency: High
15. Can the general sibling combinator (~) select elements that appear before the reference element?
Level: Expert | Frequency: High
16. What happens if the sibling element doesn’t exist in the DOM? Can you combine multiple combinators in a single selector? Give an example.
Level: Expert | Frequency: High
17. Can combinators be used together with pseudo-classes or pseudo-elements?
Level: Expert | Frequency: High
18. What happens if you use a combinator between unrelated elements?
Level: Expert | Frequency: High
19. How do combinators affect CSS inheritance and cascade?
Level: Expert | Frequency: High
20. How would you select all <p> elements that are inside a <div> using combinators? How would you style only the direct child <li> elements inside a <ul>?
Level: Expert | Frequency: High
21. How would you change the color of a paragraph that immediately follows a heading?
Level: Expert | Frequency: High
22. How can you style all <span> elements that come after a specific <div>?
Level: Expert | Frequency: High
23. Write a selector to target all <a> tags inside a <nav> but not inside a <footer>. How would you use combinators to create alternating styles between elements?
Level: Expert | Frequency: High
24. What happens when combinators are used inside media queries? How can combinators improve maintainability in large CSS projects?
Level: Expert | Frequency: High
25. Give a real-world example of using multiple combinators in a single rule.
Level: Expert | Frequency: High
All Topics
Basics
Selectors
Box model
Text formatters
Postioning
Display
Pseudo classes
Pseudo elements
Flexbox
Grid
Display
Combinators
Overflow
Breakpoint
Transformation and Transition
Frameworks
Everything else