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