How to use HTML to print header and footer on every printed page of a document?

前端 未结 20 1386
迷失自我
迷失自我 2020-11-21 16:51

Is it possible to print HTML pages with custom headers and footers on each printed page?

I\'d like to add the word \"UNCLASSIFIED\" in Red, Arial, size 16pt to the t

20条回答
  •  旧巷少年郎
    2020-11-21 17:23

    One approach that only works for adding headers to every page is to wrap your content in a

    and then put your header content in a tag and your content in a tag, like so:

    This content appears on every page
    Put all your content here, it can span multiple pages and your header will show up at the top of each page

    This works in Chrome, not 100% sure about other browsers.

提交回复
热议问题