It can be done in the following way:

document.getElementById("myText"). style. fontSize = "20";

or

document. getElementById ("myText"). className = "anyclass";