how to get the element style in text in js code example Example: document style document.getElementById("myH1").style.color = "red";