HTML Table Style Guide

Submitted by:Andery Smith

Date added:21 December, 2013

Category:HTML

The following table has a caption. The first row and the first column contain table header cells only; other cells are data cells.

Tags: html table , style guide

Code Snippet:

    <table summary="each row names a nordic country and specifies its total area and land area, in square kilometers">
<caption>
Caption: Sample table: Areas of the Nordic countries, in sq km</caption>
<tbody>
<tr>
<th>
Country
</th>
<th>
Total area
</th>
<th>
Land area
</th>
</tr>
<tr>
<th>
Denmark
</th>
<td>
43,070
</td>
<td>
42,370
</td>
</tr>
<tr>
<th>
Finland
</th>
<td>
337,030
</td>
<td>
305,470
</td>
</tr>
<tr>
<th>
Iceland
</th>
<td>
103,000
</td>
<td>
100,250
</td>
</tr>
<tr>
<th>
Norway
</th>
<td>
324,220
</td>
<td>
307,860
</td>
</tr>
<tr>
<th>
Sweden
</th>
<td>
449,964
</td>
<td>
410,928
</td>
</tr>
</tbody>
</table>
 
 

Comments