style an element with javascript

JavaScript
document.getElementById("myH1").style.color = "red";
Source

Also in JavaScript: