跳到主要内容

Selectors — class and id

English

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.

p selects every paragraph, .note every element with class note, #title the one element with id title

讲义

登录或创建账户

IGCSE, A-Level & AP