how to change css in javascript code example Example: how to change css with js document.querySelector('h1', container).style.backgroundColor = 'red';