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