div.style.color = 'blue';
// adds the indicated style rule
div.style.cssText = 'color: blue; background: white';
// adds several style rules
div.setAttribute('style', 'color: blue; background: white');
// adds several style rules
document.getElementById("myH1").style.color = "red";
//on HTML *Purist Style* || *Only JavaScript*
<style> //
.example { // para.style.color = 'white';
color: white; // para.style.background = 'black';
background-color: black; // para.style.padding = '10px';
padding: 10px; // para.style.width = '250px';
width: 250px; // para.style.textAlign = 'center';
text-align: center;
}
</style>
// on JavaScript
Element.setAttribute('class', 'highlight');
<html>
<style>
</style>
<script>
</script>
</html>
marquee ngu