Put in order · JavaScript and React course · Module 7: Styling and Animations

CSS Selector Specificity

Order CSS selectors by specificity from highest to lowest:

Items to put in order

  • ID selectors (#header)
  • Universal selector (*)
  • Class selectors (.button)
  • Inline styles (style="...")
  • Element selectors (div, p, h1)

You can check the correct answer by solving this task in the CodeWorlds game.