how to set styles from js code example Example: how to give css style in javascript Click to copydocument.getElementById("myH1").style.color = "red";