Select Exit from the File menu to close Notepad.