One, simple selector

  • Element selectorelement
  • The id selector#id
  • Class selectors.class
  • Universal selector*
  • Group selectorelement1,element2...

Two, combination selector

  • Descendant selectorelement element

Div p Selects all

elements within the

element

  • Child selectorselement > element

Div > p selects all

elements whose parent is a

element

  • Adjacent sibling selectorelement + element

Div + p selects all

elements that follow

elements