When you use Notepad in Windows, you can remove or change headers and footers. The default header and footer settings in Notepad are:

  • Headers: &f

  • Footers: Page &p

These commands give you the title of the document on the top of the page and a page number at the bottom of a printed document.

These settings can't be saved, so all header and footer settings must be entered manually each time you want to print a document.

To change headers and footers

  • Select Page Setup from the File menu and enter the desired command(s) in the Header and Footer text boxes. Here's a short list of header and footer commands:

    Command

    Action

    &l

    Left-align the characters that follow.

    &c

    Center the characters that follow.

    &r

    Right-align the characters that follow.

    &d

    Print the current date.

    &t

    Print the current time.

    &f

    Print the name of the document.

    &p

    Print the page number.

  • In the appropriate box, insert the header or footer text you want to display. (If you leave the Header or Footer text box empty, no header or footer will print.)

Note: In Notepad, if the formatting code is not the first item in the Header text box, your header is centered regardless of the formatting codes you use. For example, to align a title to the left side of the page, use &lTitle text.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Find solutions to common problems or get help from a support agent.