You can wrap the text in a [code][/code] tag and set the color with a CSS attribute: [code js] document.getElementById("total").innerHTML = "Total : " + You set the style per element and not by its content: function init() { document. getElementById("about").style.color = 'blue'; }. With innerHTML
24 Dec 2003 First, set the waiting text color and background color using CSS. Then, from the onload tag, have some JavaScript change the colors again:.
This being said, you should avoid using the tag. It is now deprecated. Use CSS to change the style (color) of a given element in your DOCTYPE html>
Lets start with creating a . html file and add the markup for the page and the menu . The example below will change the background color to #eee and the text
You set the style per element and not by its content: function init() { document. getElementById("about").style.color = 'blue'; }. With innerHTML This being said, you should avoid using the tag. It is now deprecated. Use CSS to change the style (color) of a given element in your DOCTYPE html>