Alternatively called Control+W and C-w, ^w, Ctrl+W is a keyboard shortcut to close a program, window, tab, or document.
How to use the Ctrl+W keyboard shortcut
To use this keyboard shortcut, press and hold either Ctrl key, and while continuing to hold, press W.
Ctrl+W in an Internet browser
In all major Internet browsers (e.g., Chrome, Edge, Firefox, Opera), pressing Ctrl+W closes the current tab. If there aren't multiple tabs open, pressing Ctrl+W closes the browser.
To restore or undo a closed tab use the keyboard shortcut Ctrl+Shift+Tab
Ctrl+W in Excel
In Microsoft Excel and other spreadsheet programs, pressing Ctrl+W closes the current workbook.
If you're editing the contents of a cell and press Ctrl+W, nothing will happen.
Ctrl+W in Microsoft PowerPoint
In Microsoft PowerPoint, Ctrl+W closes the current presentation.
Ctrl+W in Word and other word processors
In Microsoft Word and other word processors, pressing Ctrl+W closes the current document. If there are any unsaved changes in the document, you are prompted to save the document before closing it.
Related keyboard shortcuts and keys
Below are links to related keyboard shortcuts and individual key pages.