Here’s how to close a web browser with a hotkey.
How to Quickly Close Web Browsers on a Windows Computer
Browser use different keyboard shortcuts:
In Chrome and Edge, press Alt+F4 to close the active window. In Internet Explorer, Firefox, Safari, and Opera, press Win+M to minimize all open windows to the taskbar, or press Alt+F4 to quit the active instance of the browser.
In Windows 10, the Win+D hotkey toggles the desktop. Press it to minimize all currently open apps (foreground and background) to the taskbar, and reveal the desktop. Press it again to bring those same apps back to the original positions.
How to Quickly Close Web Browsers on Mac OS X and macOS
For all browsers, press Cmd+H to hide all active browser windows or press Cmd+Q to quit the application.