How do I specify page breaks in HTML?

We often get the question about creating HTML that sends proper page breaks to the printer.

It's actually very easy to handle. There are two ways to do it:

1) via CSS - for the advanced HTML users:

<p style="page-break-after:always;"></p>
2) with a simple comment:

<p><!-- pagebreak --></p>
For example, if you try printing this page (try Chrome print preview) the line below should be on a second page:

Page break below this line.

This line should be on the top of the second page.

That's it.
 
We often get the question about creating HTML that sends proper page breaks to the printer.

It's actually very easy to handle. There are two ways to do it:

1) via CSS - for the advanced HTML users:

<p style="page-break-after:always;"></p>
2) with a simple comment:

<p><!-- pagebreak --></p>
For example, if you try printing this page (try Chrome print preview) the line below should be on a second page:

Page break below this line.

This line should be on the top of the second page.

That's it.

It's really simple :)
 
Back
Top