HTML and CSS Reference
In-Depth Information
<th> Eye Color </th>
<td> Blue </td>
<td> Blue </td>
<td> Brown </td>
</tr>
Figure 10.2 shows how this table displays in a browser.
.
Output
FIGURE 10.2
An example of a
table that includes
headings in the
leftmost column.
Empty Cells
Both table heading cells and data cells can contain any text, HTML code, or both,
including links, lists, forms, images, and other tables. But what if you want a cell with
nothing in it? That's easy. Just define a cell with a <th> or <td> element with nothing
inside it:
Input
<table border=“1”>
<tr>
<td></td>
<td> 10 </td>
<td> 20 </td>
</tr>
</table>
Some older browsers display empty cells of this sort as if they don't exist at all. If you
want to force a truly empty cell, you can add a line break with no other text in that cell
by itself:
Input
<table border=“1”>
<tr>
<td><br /></td>
 
 
Search WWH ::




Custom Search