Ask HN: HTML Print Pagination?
I am so impressed with how far we have come with HTML and CSS over the years. But printing still leaves orphaned headers at the bottom of pages and splits paragraphs so that 1% of my paragraph is on a page by itself.
<p> and <h*> are the bread and butter of semantic text on the web. Is there still no way of heuristically placing them on the printed page, in a way that looks typographically reasonable?
5 comments
[ 4.1 ms ] story [ 21.2 ms ] threadhttps://www.russellbeattie.com/notes/posts/we-need-an-html-d...
A somewhat mundane reason for the examples, you provided, and for these rules seldom seen in action may be that with websites, there's rarely substantial care invested in print layouts, anymore. (This used to be slightly different, when executives still used to interact with the Internet on a print-out-only basis and pages came with extensive, dedicated print style-sheets. Meaning, print was how your customers were probably experiencing their new website, as were their peers, so it was important. There are also possible, additional problems related to reflow and varying resources, esp. with JS-generated content.) In a way, "mobile first" also meant "print definitely last", since it's yet another layout to maintain.
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/break-befor..., https://developer.mozilla.org/en-US/docs/Web/CSS/break-after, https://developer.mozilla.org/en-US/docs/Web/CSS/break-insid...
http://www.undr.com/understatement/2020/the_one_where_we_beg...