Skip to content

Selectors — class and id

Handout

Three kinds of selector

  • A selector says which elements a rule changes.
  • By tag: p { ... } changes every <p>.
  • That is the kind you used last lesson.

Three selectors: a bare tag name, a .class with a dot, and a #id with a hash

Handout

Log in or create account

IGCSE & A-Level