Adding Page Break to the HTML Pages

You have added page break in the MS-Office documents for printing the documents. But how to add the page break in html documents. With the help of cascading style sheet 2, you can command the browser when break pages when someone printing the web pages. Only internet explore 4.x and higher support this feature.

So, now check which paragraph will be the beginning page of a new document. Insert the following tag before the paragraph using <p> :

<P style="page-break-before: always">

Example :

<html>
<body>

Page Break Example

<p style="page-break-before: always">

Text for the Page 2

<p style="page-break-before: always">

Text for the page 3

</body>
</html>


2 comments:

Anonymous said...

Great little CSS snippet. I'm assuming this would go into the 'print' CSS. Could you confirm?

Anonymous said...

I am trying to learn a bit about Seo. Lovely tips.