Alternatively called Control+F4 and C-f4, Ctrl+F4 is a keyboard shortcut to close a tab or window within a program.
If you want to close a program and all of its tabs and windows, use the Alt+F4 keyboard shortcut.
How to use the Ctrl+F4 keyboard shortcut
To use this keyboard shortcut, press and hold either Ctrl key, and while continuing to hold, press the F4 key.
Ctrl+F4 in an Internet browser
In all major Internet browsers (e.g., Chrome, Edge, Firefox, Opera), pressing Ctrl+F4 closes the active tab, or the entire browser if only one tab is open.
Ctrl+F4 in Excel and other spreadsheet programs
In Microsoft Excel and some other spreadsheet programs, pressing Ctrl+F4 closes the active workbook.
Ctrl+F4 in Microsoft Windows
In Microsoft Windows, pressing Ctrl+F4 closes the active tab or window in a program that supports multiple tabs or windows.
Ctrl+F4 in an edit command line window
While in the MS-DOS or Windows command line edit command window, pressing Ctrl+F4 closes a second open edit window.
Related keyboard shortcuts and keys
Below are links to related keyboard shortcuts and individual key pages.