I tried Rick Bassham solution and it is working for me.
thead { display: table-header-group; }
tfoot { display: table-footer-group; }
<body>
<table>
<thead><tr><td>Your header goes here</td></tr></thead>
<tbody>
<tr><td>
Page body in here -- as long as it needs to be
</td></tr>
</tbody>
<tfoot><tr><td>Your footer goes here</td></tr></tfoot>
</table>
</body>
If you want header and footer appear only on print copy then use this
<style type="text/css">
@media print {
thead { display: table-header-group; }
tfoot { display: table-footer-group; }
}
@media screen {
thead { display: block; }
tfoot { display: block; }
}
</style>