The HTML and CSS
We're going to start by building a basic HTML page, tables.htm, containing a simple table:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset="iso-8859-1"" />
<title>Tables</title>
<script type="text/javascript" src="tables.js"></script>
<link href="tables.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table summary="Details of the weekly sales data" id="table1">
<caption>
Weekly Sales
</caption>
<thead>
<tr>
<th scope="col">Id</th>
<th scope="col">Name</th>
<th scope="col">Average Sales per Week </th>
<th scope="col">Sales this Week </th>
<th scope="col">Sales to Date </th>
</tr>
</thead>
<tbody>
<tr>
<td>00001</td>
<td>Robert</td>
<td>35</td>
<td>20</td>
<td>800</td>
</tr>
<tr>
<td>00002</td>
<td>Kate</td>
<td>27</td>
<td>30</td>
<td>600</td>
</tr>
<tr>
<td>00003</td>
<td>Martin</td>
<td>34</td>
<td>25</td>
<td>340</td>
</tr>
<tr>
<td>00004</td>
<td>Anna</td>
<td>29</td>
<td>45</td>
<td>120</td>
</tr>
</tbody>
</table>
</body>
</html>