Changing CSS styles using Javascript

Posted on 13-03-2017 by Nadir Latif


Source: https://www.w3schools.com/jsref/prop_html_style.asp

We can change CSS styles from Javascript by using following code:



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