Table Cell
A Table Cell is one "box" within a table. For example, the
table below has thirteen cells -- one across the top with "2003
Sales" as the header, and twelve data cells below.
| 2003 Sales |
| Product SKU |
January |
February |
March |
| 3487928 |
$3000 |
$3100 |
$3300 |
| 3582734 |
$2000 |
$1900 |
$2200 |
The HTML code for a table may look something like this:
|
|
<table>
<tr>
<th>A</th>
<th>B</th>
</tr>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
</table> |
<table></table>
These tags show where the table begins and ends.<tr></tr>
These tags show where each table row begins and ends.
<th></th>
These tags are specifically for table header cells. They
enclose the content that is inside each cell. <td></td>
These tags show where each table cell begins and ends.
They enclose the content that is inside each cell. |
There are two types of table cells.
- "Normal" table cells are marked in the HTML code by the
<td></td> tags. With default formatting, the content in a
table cell is left-aligned and will float vertically in the
middle of the cell.
- "Header" table cells are marked in the HTML code by the
<th></th> tags. With default formatting, the content in a
table header cell is center-aligned, bold text, and floats
vertically in the middle of the cell. Header cells were
originally designed to hold table header information.
Learn more about Table Cell Properties to find out more about
formatting cells, adding background colors, causing cells to
"stretch" across columns or rows, and more.
Related Links:
|