
Once you have selected an element, you can change it. element.textContent gets or sets its text. element.innerHTML gets or sets its HTML content (use with caution — never insert untrusted user input via innerHTML). element.style.color = 'red' changes its CSS inline. These three techniques cover most DOM manipulation needs.
Reference:
TaskLoco™ — The Sticky Note GOAT