changing background color of an elemet with javascript code example Example: javascript change background color document.body.style.backgroundColor = "yellow";