Forced page breaks in Word documents and standard HTML pages

A few people have asked how to foce a page break inside a Word document when generating it through HTML/XML/CSS as I described in an earlier post. You can force page breaks by using a <br> tag with a page-break-before style setting, as in the following code.

Page One

Page Two

This particular CSS property is actually not MS Word specific and works in standard HTML pages with modern browsers including Internet Explorer 6 and Netscape 7.0. It’s safely ignored by Netscape 4.7. When used in a standard HTML page displayed in a browser, the display appears like a normal break on screen but foces a new page when printed.

This entry was posted in Uncategorized by Sam. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>