On the Mac, you can close all the tabs in Safari (or any browser of your choice, really) with the keyboard combo of Option-Command-W. Hit that, and all the tabs in all the windows open will close at once. It mirrors the Finder command, which will close all Finder windows.
You can swipe away the tabs one at a time when you’re browsing on your iPad or iPhone, but there’s no keyboard command equivalent to close them all at once. How can you close all the tabs you have open in one fell swoop?
This trick uses the private browsing feature built into iOS 7’s mobile Safari app. Launch Safari, and tap the tabs button in the lower right of the screen, and you’ll see all the tabs you currently have open in a nicely arranged column.
Next, tap the Private button in the lower left section of the screen. This is where you’ll get the option to Close All tabs. You can also choose to Keep All tabs or Cancel the whole thing. You’ll get a Private tab to use, but you can just tap the multi-tab icon again in the right botoom corner, and then tap Private again to disable the private feature.
Now you can close all those tabs that are sitting in Safari to web pages you forgot you even went to, without having to swipe them all closed one at a time. Sweet, right?
Source: iPad Insight