Closing all of your tabs open in Safari is not an exceptionally quick task—you have the choice of either tapping the X on the left edge of each page or swiping each tab to the left of the screen.
If you have a load of tabs open, you'll have to swipe or tap through all of them. Instead of wasting time, I'm going to show you the quick way of closing all of the open tabs in Safari.
In order to close all of the tabs at once, go to the tabs viewfinder in Safari and tap on Private. When the popup shows, it will give you the option to Close All tabs.
Once you tap it, all of the tabs will close and a private browsing tab will open. If you don't want to stay in private browsing mode you can switch back by tapping back on the tab icon on the bottom right and then tapping on Private.
This trick only works with iOS 7 and it's a quick and easy way to close all the tabs on Safari when they start piling up.