Search IOCombats

Search challenges, guides, questions and articles

Selectors Interview Questions

6 curated selectors interview questions with detailed answers and examples.

← Browse all interview questions

Learn the three-column specificity calculation, where inline styles and !important sit in the cascade, and why specificity is only one tiebreaker among several.

beginnercascade specificitycssspecificitycascade

Both flatten selector lists identically, but :is() takes the specificity of its most specific argument while :where() is always zero.

advancedcascade specificitycsswhereis

Learn how :has() lets a parent be styled based on its descendants, replacing a whole category of JavaScript class toggling.

advancedselectors pseudocsshas-selectorselectors

Three focus pseudo-classes with three different jobs, and the accessibility reason :focus-visible exists at all.

intermediateselectors pseudocssfocus-visiblefocus-within

One counts every sibling, the other counts only siblings of the same element type. See exactly where they diverge and what the of S syntax adds.

intermediateselectors pseudocssnth-childnth-of-type

One selects existing elements in a particular state, the other creates a sub-part that is not in the DOM. Learn the syntax, specificity, and limits of each.

beginnerselectors pseudocsspseudo-classpseudo-element