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