SHARE
Facebook X Pinterest WhatsApp

So, You Want Color in a Table, Huh?

Written By
thumbnail
Joe Burns
Joe Burns
Jan 4, 2005

Use these to jump around or read it all…

[A Simple Color Table] [Changing Text Color, Too]

     I should point out that this tutorial will not get into the creation of the table itself, only changing the background and text color. To read up on how to make a table, see the Table tutorial.

A Simple Color Table

     Dig this…

Yellow Stars Green Clovers
Purple Moons Blue something or other…

Here’s What Did It

<TABLE BORDER=4 CELLSPACING=4 CELLPADDING=4>
<TR>
<TD BGCOLOR=”#ffff00″>Yellow Stars
<TD BGCOLOR=”#00ff00″>Green Clovers
</TR>
<TR>
<TD BGCOLOR=”#ff00ff”>Purple Moons
<TD BGCOLOR=”00ffff”>Blue something or other…
</TD>
</TR>
</TABLE>

 

     Notice it’s just a basic table with a BGCOLOR= command stuck in now and again for good measure. That’s how you do it. Whatever color you would like, put either the hex code or the word codefor the color and you’re off and running.

Changing Text Color, Too

     Dig this too…

Yellow Stars Green Clovers
Purple Moons Blue something or other…

Here’s What Did It

     At least here’s the top left cell…

<TD BGCOLOR=”#ffff00″>
<FONT COLOR=”#800517″>Yellow Stars</FONT>

     Notice it’s the same commands as for the table. I just used the font colorcommands to change the text color.

     Put it all together and you can create some pretty awful looking tables!

 Enjoy!

[A Simple Color Table] [Changing Text Color, Too]

Recommended for you...

How To Improve Website Navigation
Enrique Corrales
Dec 11, 2021
Common UX Design Mistakes
Understanding Z Index in CSS
Tariq Siddiqui
Aug 24, 2021
How to Improve Your Website’s User Experience (UX)
Enrique Corrales
Jun 30, 2021
HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.