change background with DOM code example Example: document.body.style.background // Change the background color to red document.body.style.backgroundColor = "red";