HTML and CSS Reference
In-Depth Information
Adding a caption
You can improve your table right off the bat by adding a caption.
<table>
<caption>
The cities I visited on my
Segway'n USA travels
</caption>
<tr>
<th> City </th>
<th> Date </th>
<th> Temperature </th>
<th> Altitude </th>
<th> Population </th>
<th> Diner Rating </th>
</tr>
<tr>
<td> Walla Walla, WA </td>
<td> June 15th </td>
<td> 75 </td>
<td> 1,204 ft </td>
<td> 29,686 </td>
<td> 4/5 </td>
</tr>
<tr>
<td> Magic City, ID </td>
<td> June 25th </td>
<td> 74 </td>
<td> 5,312 ft </td>
<td> 50 </td>
<td> 3/5 </td>
</tr>
.
.
.
</table>
If you don't like the default location of
the caption, you can u se CSS to reposition
it (we'll give that a t ry in a sec). Keep
in mind that older br owsers don't fully
support repositioning the caption.
You sho uld always put the cap tion at the
top of your table in the HTM L, and use
CSS t o reposition it to the b ottom, if
that's where you want it.
 
Search WWH ::




Custom Search