Changing the Page

Changing the Page: Common DOM Interactions, Manipulating the DOM Structure.

Updated

  1. Common DOM Interactions (Apprentice): Once you have an element, you change its text with textContent, its HTML with innerHTML, its look with style, and its CSS classes with classList.
  2. Manipulating the DOM Structure (Apprentice): createElement makes a new element, appendChild puts it inside a parent so it shows on the page, and remove takes an element off the page.