How to Change the Font Color of an HTML Table

By Ryan Kelley

Editing HTML in a text editor is not like editing a document and changing preferences in a Microsoft Word document. 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 "" tag to define the color. Alternatively, if you have multiple cells or rows or want to change the color of the entire table, you can use CSS style tags.

Using the Tag

Step 1

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

Step 2

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

Step 3

Insert "" (without the quotes on the ends) before the text, where "colorname" is the name of the color you want the text to be. Use the "" tag after the string of text. For example, to change the font color to purpose you would type the command below.Purple TextA list of colors can be found in the Resource section below.

Using the CSS

Step 1

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

Step 2

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

Step 3

Place your text insertion point in the

tag of the table row you want to change and alter it to "," (without the quotes on the ends) where "colorname" is the color you want the text to be. For example, to change the text color to purple type the command below.

Changing Color of an Entire Table Using CSS

Step 1

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

Step 2

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

Step 3

Place your text insertion point in the

tag of the table you want to change and alter it to "
" (without the quotes on the ends), where "colorname" is the color you want the text to be. For example, to change the text color of the entire table type the command below.

Tips & Warnings

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