I would like to change the html tag dynamically in JavaScript.
I have tried using
document.getElementById("html").setAttribute("style", "background: #000000")
but received the following error: Uncaught TypeError: Cannot read property 'setAttribute' of null
How would I go about doing so?
CSS
html {
background: #FFFFFF;
}