Question:

What is the html code for changing the color of text?

by  |  earlier

0 LIKES UnLike

like when writing a myspace comment i want to change the color of the text

 Tags:

   Report

3 ANSWERS


  1. color="red"

    <basefont color="Green" size="3" face="Verdana">


  2. <span style="color:blue">Your text goes here</span>

    where blue can be replaced by color values like #FFCC99, red or rgb(96,255,0).

  3. There are two basic ways to change the font color. The old way used the <font> tag. The new way, uses CSS. I assume that you will want to change the text color inline as opposed to doing so in a separate CSS file.

    <font color="#800000">This text is dark red.</font>

    <span style="color:#800000">This text is dark red.</span>

    The second method is preferable and can be used in almost any block level or inline level HTML tag. You can also use color names and the CSS RGB function to mix colors with decimal values.

    These examples are all the same color red:

    <span style="color:red">This text is red.</span>

    <div style="color:rgb(255,0,0)">This text is red.</div>

    <li style="color:f00">This text is red.</li>

    <span style="color:ff0000">This text is red.</span>

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions