What does selector mean?

In web development, selector means the part of a CSS rule that says which elements the styles apply to, for example p, .button or #header.

sɪˈlektərnounCore term

Web Development vocabulary · CSS and Layout

In Turkish: seçici, selector

Also used in: Software Engineering

How it is used

Developers write, combine and simplify selectors, and the same selectors are used in JavaScript with querySelector(). Common types are element, class, ID, attribute and pseudo-class selectors.

Example sentences

  1. This selector is too specific; just use the class name.

  2. The test fails because the selector no longer matches any element.

Common collocations

  • CSS selector
  • class selector
  • ID selector
  • match a selector
  • complex selector

More terms: CSS and Layout

Practise with graded reading

Reading at the right level is the fastest way to make new words stick. Pick free English books by level: