Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I force headers/footers to appear on printed page

Forced Headers and Footers

How do I force headers/footers to appear on printed page

by  rhackenb  Posted    (Edited  )
To force a header or footer to appear on every printed page of a web page, you can use the <THEAD> and <TFOOT> html markup. You may want to do this to make a "Company Proprietary" note to appear on a printed copy of a company-internal document.

A working example can be found at
http://www.eticomm.net/~rhackenb/test/tfoot.html

Bring up the page and either print it or do a print preview. You'll see a header and footer appear on every printed page.

Here is an abbreviated form of it:

------------------------------------------------
<html>
<head>
<title> tfoot.html</title>
</head>
<body>
<center>
<TABLE >
<THEAD style="display: table-header-group">
<TR><TH>Company Private </TH></TR>
</THEAD>
<TFOOT style="display: table-footer-group">
<TR><TH>Not for distribution outside the company</TH>
</TFOOT>
<TBODY>
<tr><td>

PUT MANY LINES OF TEXT HERE TO TEST IT.
<ol>
<li>Sample text
<li>Sample text
.......
<li>Sample text
<li>Sample text
</ol>

</td></tr>
</TBODY>

</TABLE>
</center>
</body>
</html>

------------------------------------------------

Note: this works with Internet Explorer, Netscape 6.0, and Mozilla but not with Netscape 4.7.

-- Bob Hackenberg
(rhackenb@eticomm.net)
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top