Changing Styles of ID
document.getElementById("abc").style.left="80px";
document.getElementById("abc").style.background="blue";
Changing Style of Class
document.getElementsByClassName("ppp")[0].style.color = "blue";
document.getElementsByClassName("ppp")[0].style.fontFamily = "Arial";
document.getElementsByClassName("ppp")[0].style.fontSize = "larger";
Changing Style of all CSS Classes with Loop
for(x=0;x<=3;x++){
document.getElementsByClassName('abc')[x].style.color='blue';
}