Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<style>
@media print {
table {
page-break-inside: avoid;
}
tr {
break-inside: avoid;
}
tbody {
display: block;
}
tbody tr:nth-child(5n + 1) {
page-break-before: always;
}
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>Row 1, Column 1</td>
<td>Row 1, Column 2</td>
<td>Row 1, Column 3</td>
</tr>
<tr>