|
In HTML, color is referenced in plain english for a certain set colors
as well as in a 3 byte hexadecimal word. Click here
for a plain english color chart. Click here
for an explanation on Color using hexadecimal.
A Simple Color Table
Table 1
| Red |
Green |
| Blue |
Yellow |
Table 2
| Red |
Green |
| Blue |
Yellow |
To add color to the background of a cell or table, the command is "BGCOLOR".
Here's the code for the table 1 above:
<table width="50%" border="2" align="center"
cellpadding="2" cellspacing="2">
<tr>
<td width="50%" align="center"
bgcolor="red">Red</td>
<td align="center" bgcolor="green">Green</td>
</tr>
<tr>
<td width="50%" align="center"
bgcolor="blue">Blue</td>
<td align="center" bgcolor="yellow">Yellow</td>
</tr>
</table>
Here's the code for the table 2 above:
<table width="300" border="2" align="center"
cellpadding="2" cellspacing="2" bgcolor="aqua">
<caption>Table 2</caption>
<tr>
<td width="50%" align="center">Red</td>
<td align="center">Green</td>
</tr>
<tr>
<td width="50%" align="center">Blue</td>
<td align="center">Yellow</td>
</tr>
</table>
You can change the text color...
Table 3
| Red |
Green |
| Blue |
Yellow |
You simply add <FONT COLOR="value">
Here's the code for table 3:
<table width="300" border="2" align="center"
cellpadding="2" cellspacing="2">
<tr>
<caption>Table 3</caption>
<td width="50%" align="center"
bgcolor="red"><font color="green">Red</font></td>
<td align="center" bgcolor="green"><font
color="red">Green</font></td>
</tr>
<tr>
<td width="50%" align="center"
bgcolor="blue"><font color="yellow">Blue</font></td>
<td align="center" bgcolor="yellow"><font
color="blue">Yellow</font></td>
</tr>
</table>
And you can change border color...
Table 4
| Red |
Green |
| Blue |
Yellow |
The command for border color is BORDORCOLOR:
<table width="300" border="5" align="center"
cellpadding="2" cellspacing="2" bordercolor="red"
bgcolor="aqua">
|