Common DOM Properties
element.innerText- The text of an element. Readable or writeableelement.innerHTML- The HTML contents of an element- Can change to add / remove elements
- This can be a bit tricky to get right
- Great power / great responsibility
element.id- The id of the element. Readable or writeableelement.classList- Lets you see all the classes of an elementelement.classList.add("test")- Adds a new class of "test". Powerful with CSS
5 / 17