HTML DOM Style backgroundColor property
\\nIn this tutorial, you will learn how to use JavaScript's backgroundColor propertyto set the background color of HTML elements.
<div id="myDiv">This is an example div element.</div>\\n<script>\\n var element = document.getElementById("myDiv");\\n element.style.backgroundColor = "lightblue";\\n</script>\\n\\n \\n \\n\\n```
YouTip