How to change text color in JavaScript

1 Answer

0 votes
<div id="divid">
   <p>text text text</p>
</div>
const div = document.getElementById("divid");

div.style.color = "green";
  
    
    
    
    
/*
run:
    

*/

 



answered Jun 29, 2021 by avibootz
...