the code is very short and clear, i just want to change the color of body tag with the opening and closing tag < >
can someone explain to me why it does not work? and how to fix it.
var newColors = document.getElementById('mainPreTah').innerHTML;
newColors.replace(/<body>/g, "<span style='color:blue'><body></span>");
document.getElementById('mainPreTah').innerHTML = newColors;