how to give computed style to createelement in javascript code example Example: how to give css style in javascript document.getElementById("myH1").style.color = "red";