js html element css code example Example: how to change css using javascript Click to copydocument.getElementById("myText").className = "anyNewClass"