HTML and CSS Reference
In-Depth Information
Listing 7-9. Note that the first table cell in each row is now a table heading
<table>
<tr>
<th>Product</th>
<th>Quantity</th>
</tr>
<tr>
<th>Utility Belts</th>
<td>9</td>
</tr>
<tr>
<th>Grappling Hooks</th>
<td>27</td>
</tr>
<tr>
<th>Smoke Pellets</th>
<td>623</td>
</tr>
</table>
Figure 7-4. Browser output of a table with table row headings
Required Attributes
Similar to the td element, the th element has no required attributes.
Optional Attributes
The th element has the following optional attributes in addition to the global attributes.
scope : an enumerated attribute defining the scope of a table header. There are four
explicit values for this attribute and one implied, default state. Those values are:
row : the table heading applies to some of the succeeding cells in the same row.
col : the table heading applies to some of the succeeding cells in the same column.
rowgroup : The table heading applies to the remaining cells in the same row.
colgroup : The table heading applies to the remaining cells in the same column.
auto : the table heading applies to a set of cells based on context. This attribute
value is implied in the absence of any of the other four attribute values and
shouldn't be used explicitly.
 
Search WWH ::




Custom Search