Things You'll Need:
- Web Editing Software with an HTML Code View Web Browser
-
Step 1
Open your web editing software and the web page that contains the table you want to add color to, or create a new web page and add a table to it.
-
Step 2
View the HTML code for your web page in your editing tool. In Adobe Dreamweaver, for example, click the "Code" or "Split" button at the top of the editing window.
-
Step 3
HTML bgcolor AttributeInsert the attribute "bgcolor" and a color choice into your <TABLE>, <TR> or <TD> HTML tag if you want to change the background color using the older method. The code would look similar to: <table bgcolor=#990000 width="100%" border="0">, <tr bgcolor="#9900CC"> or <td bgcolor="#9900CC">.
-
Step 4
Save your file changes and upload your web page to your web server to view the table colors in your web browser.
-
Step 1
CSS Style TagInsert a <STYLE> tag in the <HEAD> section of your web page (above the BODY tag) and add CSS color definitions to control the appearance of all the tables on your web page. The code would look similar to: <style> table { background-color:#FF0000; } </style>. Then any time you insert a <TABLE> tag in the body of this page, it will have this color.
-
Step 2
CSS Style in Table TagInsert a CSS style definition directly into a <TABLE> tag in the body of the web page if you want to change the color for only one table on a page that has many. The code would look similar to: <table style="background-color:#0033CC" width="100%" border="0">.
-
Step 3
Insert a style definition to control the background color of individual table row tags (TR) or table cell tags (TD) as you did for the <TABLE> tag in Step 2. This code would look similar to: <tr style="background-color:#0033CC"> and <td style="background-color:#0033CC">.
-
Step 4
Save your file changes and upload your web page to your web server to view the table colors in your web browser.








