+ 1

why this code cannot change the color of the text?

<div id="demo" style="width:200px">some text</div> <script> var x = document.getElementById("demo"); x.style.color = "6600FF"; x.style.width = "100px"; </script>

8th Mar 2020, 3:17 PM
biniam bisrat
biniam bisrat - avatar
1 Answer