I am designing a web page which I would like to be printable. The layout looks acceptable, except for one point: Headers sometimes get split (vertically) between different pages:
I obtained this example by trying to print https://www.craftinginterpreters.com/evaluating-expressions.html (which is a terrific read, by the way).
What causes this ugly artifact? Is there anything I can do in CSS, HTML, or otherwise to prevent this kind of splitting?