Site Overlay

Printing Table Headers on Every Page

It is sometimes necessary to print table headers on every page for long html tables spanning multiple pages.

<style>
    thead {display: table-header-group;}
</style>

<table cellpadding=”0″ cellspacing=”0″>
    <thead>
        <tr>
            <th>S.no.</th>
            <th>Name</th>
            <th>Address</th>
            <th>Phone no.</th>
        </tr>
    </thead>
  
    <tr>
    ….long html table here ….
    </tr>
    
</table>

Note: Does not work in  Chrome, Safari or Opera however.

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2020 Sugat Shrestha. All Rights Reserved. | Catch Vogue by Catch Themes