Adding Table Headers
A table header denotes the header of a column or row within a table.
<th></th>
To have your headers describe the column beneath them, place all the headers in a row, and place the columns that will appear underneath in subsequent rows (see Example 4-5).
Example 4-5. Table headers for table cells
<table width="90%" border="1" cellspacing="5" cellpadding="5"><tr><th>Location</th><th>Weather</th><th>Time Zone</th></tr><tr><td>Tucson, Arizona</td><td>Warm to Hot</td><td>No Daylight Savings</td></tr></table>
By default, the browser renders table headers in bold type. As you can see in Figure 4-6, the header text is centered. You can, of course, modify the header weight, color, and other styles using CSS.
Figure 4-6. Adding ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access