I have a <table>.
table {
page-break-inside: auto
}
tr {
page-break-inside: avoid;
page-break-after: auto
}
thead {
display: table-header-group
}
tfoot {
display: table-footer-group
}
<h2>Title</h2>
<table>
<thead>
<tr>
<th>
Test
</th>
<th>
Test 2
</th>
</tr>
</thead>
<tbody>
<td>
Test
</td>
<td>
Test 2
</td>
</tbody>
</table>
<h2>Another one</h2>
<table>
<thead>
<tr>
<th>
Test
</th>
<th>
Test 2
</th>
</tr>
</thead>
<tbody>
<td>
Test
</td>
<td>
Test 2
</td>
</tbody>
</table>
<table> sits on the other page.