151 users online (0 members and 151 guests)  

  HTML Table Header Cell Tag

This tag starts a header table cell. Like the <td> tag, it needs to be within both the <table> and <tr> tags.

Here is an example

<th bgcolor="#FFFFFF" align="center" valign="center" colspan="2" rowspan="2">

This is just like the <td> tag except for one thing, the default text inside this type of table cell is already centered and bolded.

Here are the attributes

  • bgcolor - Sets the background color of the cell

  • align - Sets the justification of the cell contents (see above for possible inputs)

  • valign - Sets the vertical justification of the cell content (see above for possible inputs)

  • colspan - Tables are meant to be grids, but this makes it so you can join cells horizontally

  • rowspan - Distance of the cell walls from its contents

* = mandatory

Back to the HTML menu.