Example: Setting style on a single element
This presumes that there is an element whose ID is "logo"
.
var logo = document.getElementById('logo'); logo.style.marginTop = '2em'; logo.style.backgroundColor = 'white'; logo.style.color = 'red';