Selector Cheatsheet

  • div
    Selects all <div> elements
  • .class
    Selects all elements with .class
  • #id
    Selects all elements with #id
  • div, p
    Selects all <div> and <p> elements
  • div > p
    Selects all <p> elements with an immediate parent of <div>