Codesupplier.com

free html codes for your website

Background Colour - Web table

The table below shows 2 Columns and 2 Rows. Look below the following table to construct your own web table with fill colours.

 

Column 1 Column 2
Row 2 Row 2

If you want the exact html code for the example above pease click here.

Step 1 - Use the below code to begin your Web Table. Add/delete <TD BGCOLOR="#CCCCCC">Column</TD> to get the amount of columns desired. Go to colour chart to choose the colours for the web table. Once you have got your colours chosen, edit the parts in red to colour codes that you want. 

<TABLE CELLPADDING="2" CELLSPACING="2" WIDTH="100%">
<TR>
<TD BGCOLOR="
#CCCCCC
">Column 1</TD>
<TD BGCOLOR="
#CCCCCC
">Column 2</TD>
</TR>
</TABLE>

Step 2 (same for all web tables) - To add rows place a <TR> tag below the Colunm </TR> tag. Once you have done this place <TD>Row 2</TD> below the <TR> tag however many times you have used the columns. Once you have done this close that row with </TR>. Simply repeat the process for however many rows you need.

To get colours onto rows use <TD BGCOLOR="#CCCCCC">Row </TD> (shown below:)

Your html should look like the below code (you may have more or less rows or columns)...

<TABLE CELLPADDING="2" CELLSPACING="2" WIDTH="100%">
<TR>
<TD BGCOLOR="#CCCCCC">Column 1</TD>
<TD BGCOLOR="#CCCCCC">Column 2</TD>
</TR>
<TR>
<TD BGCOLOR="#CCCCCC">Row 2</TD>
</TR>
</TABLE>

Step 3 - Then replace the rows and columns with text of your own choice. E.G. <TD BGCOLOR="#CCCCCC">Number of Apples</TD>

< Go Back to Tables List