Controlling page breaks in printouts

I have been using HTML to prepare on-line teaching materials, but when it
comes to printing them out, layout is poor - the most important problem is
orphaned headers (header at the bottom of one page, associated text on the
next), but also I have examples in <PRE> sections which I would like to
keep together on one page rather than split over a page break.

Looking through the HTML spec, the only reference I can find to page
breaks is that <H1> should force one (but Netscape 3.0 seems to ignore
this)

Style sheets look very complicated and I'm not sure they can do what I 
want anyway, which is to have a container saying "keep this section 
together as one block, by inserting a page break beforehand if necessary"

This could be done as an attribute to the <P> and <PRE> containers, but 
I'm not sure if it is allowed to put a <H>eader within a <P>, e.g.

<P BLOCK>
<H2>My heading</H2>
The lines I want to keep with the heading
</P>

If not, my preferred solution would be a new container to keep the items 
together:

<BLOCK>
<H2>My heading</H2>
<P>
The lines I want to keep with the heading
</P>
</BLOCK>

Otherwise you would need Microsoft-Word-type attributes such as "keep 
lines together" and "keep with next item", which I don't like and in 
any case seem to be less in the spirit of HTML.

My knowledge of HTML is limited to the basic stuff (i.e. I've not played 
with tables etc) so if I'm missing something obvious, please let me know!

Brian Candler
B.Candler@pobox.com

Received on Friday, 21 June 1996 10:32:01 UTC