how to change html text color with javascript code example Example: how to change color of font in js element.style.color = '#f0f';