use javascript to add style to html elements code example Example: document style document.getElementById("myH1").style.color = "red";