providing table alignment and spacing
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
body { padding-top: 36px; }
th, td { padding: 3px 6px; }
thead th { text-align: right; }
th { text-align: left; }
td { text-align: right; }
caption { font-style: italic; }
</style>
</head>
<body>
<table cellspacing="0" border="1" align="center" width="80%">
<caption>Total Table Items</caption>
<thead>
<tr>
<th></th> <th>lunch</th> <th>dinner</th>
</tr>
</thead>
<tr>
<th>kitchen</th> <td>23</td> <td>30</td>
</tr>
<tr>
<th>dining room</th> <td>31</td> <td>45</td>
</tr>
</table>
</body>
</html>
Related examples in the same category