Last active
October 12, 2021 05:58
-
-
Save tbennett/1db5fd6b64fd22867b45 to your computer and use it in GitHub Desktop.
Example of HTML Table w/ header,footer and body
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table id="example" class="display" border="1"> | |
<!-- in HTML5 the summary, cellspacing, and cellpadding attributes are obsolete/deprecated --> | |
<caption> Global Employees Listing</caption> | |
<thead> | |
<tr> | |
<th scope="col">Name</th> | |
<th scope="col">Position</th> | |
<th scope="col">Office</th> | |
<th scope="col">Age</th> | |
<th scope="col">Start date</th> | |
<th scope="col">Salary</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td scope="row">T. Nixon</td> | |
<td>System Architect</td> | |
<td>Edinburgh</td> | |
<td>61</td> | |
<td>Mon 25th Apr 11</td> | |
<td>$320,800/y</td> | |
</tr> | |
<tr> | |
<td scope="row">G. Winters</td> | |
<td>Accountant</td> | |
<td>Tokyo</td> | |
<td>63</td> | |
<td>Mon 25th Jul 11</td> | |
<td>$170,750/y</td> | |
</tr> | |
<tr> | |
<td scope="row">A. Cox</td> | |
<td>Junior Technical Author</td> | |
<td>San Francisco</td> | |
<td>66</td> | |
<td>Mon 12th Jan 09</td> | |
<td>$86,000/y</td> | |
</tr> | |
<tr> | |
<td scope="row">C. Kelly</td> | |
<td>Senior Javascript Developer</td> | |
<td>Edinburgh</td> | |
<td>22</td> | |
<td>Thu 29th Mar 12</td> | |
<td>$433,060/y</td> | |
</tr> | |
<tr> | |
<td scope="row">A. Satou</td> | |
<td>Accountant</td> | |
<td>Tokyo</td> | |
<td>33</td> | |
<td>Fri 28th Nov 08</td> | |
<td>$162,700/y</td> | |
</tr> | |
<tr> | |
<td scope="row">B. Williamson</td> | |
<td>Integration Specialist</td> | |
<td>New York</td> | |
<td>61</td> | |
<td>Sun 2nd Dec 12</td> | |
<td>$372,000/y</td> | |
</tr> | |
</tbody> | |
<tfoot> | |
<tr> | |
<th colspan="6">Copyright 2015©</th> | |
</tr> | |
</tfoot> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current best practice is to have the tfoot after the tbody. Previously, the thead AND tfoot were supposed to precede the tbody.