You can use the page-break-before, page-break-after, and page-break-inside properties to include or avoid page breaks. For example, you could set the page-break-inside property to 'avoid' to keep table rows on the same page.
h1 { page-break-before: always; }