[HTML]

Printing HTML Pages

Here are techniques of using (i) a 1x1 transparent gif with <BR CLEAR="all">, and (ii) tables, to prevent "widows" and to force page-throws when printing HTML - try it. The techniques could be described as "dirty tricks".

Use "view source".

Note the 1x1 transparent gif at the right of the page stretched to HEIGHT=100%. It has BORDER=1 which may make it visible in the browser and/or on the printed-page. In real use, set BORDER=0.

  1. powery pointy style topics

  2. can be covered like this

  3. etc.

  4. (this in FONT SIZE=+4 )

What's rather cute is that if you change the browser window size, the HTML rendering "page"-length adjusts to fit (if it can). Also, we are not bothered about A4/quarto etc.
NB. You can also set the image HEIGHT=50% etc. if that's useful - see later.



page -2-

The transparent gif is on the left of this page for illustrative purposes only.


Here is a TABLE with WIDTH=100%, HEIGHT=100% in an attempt to achieve the same effect. This should print as page 3.

BORDER=1 only so you can see the edge of the TABLE.
Normally one would probably set BORDER=0.

Note that browsers are generally reluctant to break tables but will if they "have to".

And another similar TABLE. If it has worked, this should print as page 4.

I must say that the registration of TABLE's length with the printed-page's length seems slightly less accurate than is the case for the image, at least in N3 and N4. Maybe it is better with the table's BORDER=0?

Anything after this should get thrown onto a 5th page.

1 Heading should not occur within 25% of page bottom

This should be at the top of page 5.


2 Heading should not occur within 25% of page bottom

This should be on page 5.


3 Heading should not occur within 25% of page bottom

This should be on page 5.


4 Heading should not occur within 25% of page bottom

This could be on either page 5 or page 6 depending on how the image and table length arithmetic worked out.


5 Heading should not occur within 25% of page bottom

this should throw to page 6.

This is something completely different. This table contains the 1x1 transparent gif with HEIGHT=1, WIDTH=600. The table will grow and shrink with the browser window but will not shrink under a width of 600 because of the image:


Horizontal scrolling will be necessary to see all of the TABLE below this window width.

Note that the right hand side 1x1 gif may appear to intrude at narrow window widths but in reality we would set BORDER=0 and then the transparent gif(s) really would be invisible.



Research material, Copyright © 1999 L. Allison,
School of Computer Science and Software Engineering, Monash University, Australia 3168