Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

page-break-after

The page-break-after property allows you to specify whether a page breaks occurs after a tag when you print out a page. For example:

p.break {page-break-after: always;} 

This code would always force a page break after a paragraph that has a class="break".

You can have the following values:

  • always — forces a page break
  • auto — uses default page breaks. I can’t see why you would use it because it is the same as doing nothing
  • avoid — avoid a page break after the tag. This means the current tag is kept on the same page as the subsequent tag. You might use this with every <h1> tag to make sure a header stays with the paragraph that follows it (like keep with next in Microsoft Word)
  • left — forces a page break on left hand pages. The new page is always then a left hand page. You might get blank pages for this to work
  • right — forces a page break on right hand pages. The new page is always then a right hand page. You might get blank pages for this to work