HTML and CSS Reference
In-Depth Information
<tr>
<th>Jan</th>
<td>7.0</td>
<td>1.4</td>
<td>10.4</td>
<td>53.1</td>
<td>79.0</td>
<td>13.0</td>
</tr>
<!-- Other rows omitted -->
</table>
The table contains a caption, and the first row consists of <th> table headers. The first cell of each
subsequent row is also a <th> element, but the remaining data cells use <td> tags.
1.
load the page into a browser. As Figure 14-25 shows, the table is unstyled apart
from the font.
Figure 14-25. The table needs a touch of style
2. To make it easy to apply different styles to the main headings and the rest of the
data, wrap the first row in a pair of <thead> tags like this:
<thead>
<tr>
<th></th>
<th>Max Temp<br>[°C]</th>
<th>Min Temp<br>[°C]</th>
<th>Days of<br>Air Frost</th>
<th>Sunshine<br>[hours]</th>
<th>Rainfall<br>[mm]</th>
<th>Rain >= 1mm [days]</th>
</tr>
</thead>
 
Search WWH ::




Custom Search