Sign in with Microsoft
Sign in or create an account.
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

When you use Notepad in Windows 10/11, 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.

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

  • Choose 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:




    Left-align the characters that follow.


    Center the characters that follow.


    Right-align the characters that follow.


    Print the current date.


    Print the current time.


    Print the name of the document.


    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.

Was this information helpful?

What affected your experience?

Thank you for your feedback!