How To

How to Change the Font Color of an HTML Table

Contributor
By Ryan Kelley
eHow Contributing Writer
(1 Ratings)

There are two ways to change the font color of a table created with HTML. If you want to change the color of a single line of text, you can use the <font> tag to define the color. Alternatively, if you have multiple cells, rows or want to change the color of the entire table, you can use CSS style tags.

Difficulty: Moderately Challenging
Instructions

    Changing Color of Text in a Table Using <Font> Tag

  1. Step 1

    Start Notepad or another text editor and open the HTML document containing the table you want to change.

  2. Step 2

    Locate the string of text in your table you want to change to a different color.

  3. Step 3

    Insert <font color="colorname"> before the text, where "colorname" is the name of the color you want the text to be. Use the </font> tag after the string of text. For example: "<font color="purple">Purple Text</font>."

  4. Changing Color of a Table Row Using CSS

  5. Step 1

    Start Notepad or another text editor and open the HTML document containing the table you want to change.

  6. Step 2

    Locate the table row you want to change to a different color.

  7. Step 3

    Place your text insertion point in the <tr> tag of the table row you want to change and alter it to <tr style="color:colorname">, where "colorname" is the color you want the text to be. For example: "<tr style="color:purple">."

  8. Changing Color of an Entire Table Using CSS

  9. Step 1

    Start Notepad or another text editor and open the HTML document containing the table you want to change.

  10. Step 2

    Locate the table you want to change to a different color.

  11. Step 3

    Place your text insertion point in the <table> tag of the table you want to change and alter it to <table style="color:colorname">, where "colorname" is the color you want the text to be. For example: "<table style="color:purple">."

Tips & Warnings
  • You can also use hexadecimal color codes in place of the color name. The hexadecimal equivalent to purple is "#800080".
Resources

Post a Comment

Post a Comment
  • Have you done this? Click here to let us know.
I Did This

Related Ads

Internet
Virginia DeBolt,

Meet Virginia DeBolt eHow's Internet Expert.

Get Free Internet Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US

Demand Media
eHow_eHow Technology and Electronics