The
<TH> tag is used to set the properties of a table header in a table. As shown in the following table:
Header's <th> tag Properties
Property Description
Align horizontal alignment
valign cell contents Vertical alignment
bgcolor cell background color
Background The background image of a cell
bordercolor cell border color
Bordercolorlight cell's bright border color
Bordercolordark cell's dark border color
Width cell widths
Height cell height
with the bgcolor property, you can set the background color of the header. When the
Basic Syntax
<thbgcolor=color_value>
Syntax explanation
defines a color, you can use the English color name or hexadecimal color value to perform. Example of a
file: 10-34.htm
Sets the color of the header background.
01<!----------------------------------
02<!--file Example: 10-34.htm-->
03<!-- File Description: Set the color of the header background
04<!----------------------------------
05
06< Head>
07<title> Set header background color </title>
08
09<body>
10 <H1> the mainstream web design software
11<tableborder=3width=400height=100bordercolor= #336699
12 <tr>
13<THBGcolor= #00FFFF > Web image software </th><th>fireworks</th>
14</tr>
15<tr>
16<td> Web page making software </td><td>dreamweaver</td>
17</tr>
18<tr>
19<td> web animation software </td><td>flash</td>
20</tr>
21</table>
The
22</body>
23
File description
13th line defines the color of the table header's background color as #00ffff.