0

I need page break html feature for my project, so I just wanted to try few simple examples in order to learn how it works. Problem is, none of the examples I found online work, including 2 exampels I found on stackoverflow. These are examples I tried: Example 1:

<html>
<body>
This is
<p style="page-break-before: always">
Page #2...
<p style="page-break-before: always">
Page #3...
</body>
</html>

Example 2: php code to break page after 6th row

And W3schools doesn't provide example :(. I even tried in different browsers but nothing... Can someone please tell me what I am missing, or provide me with a simple few lines code that will actually break a page? Thanks in advance.

Mayado20
  • 31
  • 5
  • What is the error that you get? – Julia Dec 22 '19 at 21:21
  • https://stackoverflow.com/questions/1664049/can-i-force-a-page-break-in-html-printing This might help – Julia Dec 22 '19 at 21:21
  • there is no error, the page just won't break. Btw, I think I might be looking at wrong examples. I want my HTML page to break. It seems that all of these examples are for printer. I need something like ` contentcontentcontent contentcontentcontent pervious page 1 2 3 4... next page ` – Mayado20 Dec 22 '19 at 21:32
  • Try using https://developer.mozilla.org/en-US/docs/Web/CSS/break-before –  Dec 22 '19 at 21:39
  • 1
    Sorry, guys, my question is completely off. I need pagination, not page break. The reason for my mistake is probably because I used a wordpress theme that had shortcode pagebreak to paginate my content. I am really sorry. – Mayado20 Dec 22 '19 at 21:49
  • Welcome to Stack Overflow _ Instead of just a comment you should take a moment to also update the content of your post (& the title) to clarify your pagination issue – inputforcolor Dec 23 '19 at 04:57

0 Answers0