How to Change the Font Color of an HTML Table

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.

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 "<font>" 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.

Advertisement

Step 1

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

Video of the Day

Step 2

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

Advertisement

Step 3

Insert "<font color="colorname">" (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 "</font>" tag after the string of text. For example, to change the font color to purpose you would type the command below. <font color="purple">Purple Text</font>

Advertisement

A list of colors can be found in the Resource section below.

Step 4

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

Step 5

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

Advertisement

Step 6

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">," (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. <tr style="color:purple">

Advertisement

Advertisement

Step 7

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

Step 8

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

Step 9

Place your text insertion point in the <table> tag of the table you want to change and alter it to "<table style="color:colorname">" (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. <table style="color:purple">

Video of the Day

Advertisement

Advertisement

references & resources