While experimenting, I attempted to alter the text color of my HTML using JavaScript. After a few attempts, I came to the realization that I cannot change the color if I am already changing it in CSS. Does this mean CSS is executed at the end? Also, how can I change the color of the text after clicking a button if I am also changing it in CSS? I apologize for my lack of experience in this area.
function changecol()
{
var html=document.body;
html.style.backgroundColor='black';
html.style.color='white';
}
I expected all the lines in my HTML to turn white, but only those where I had not applied CSS became white.