Inflation in the UK held steady last month with cheaper clothes prices balanced out by a surge in the cost of hotels amid a busy summer of events, official figures showed.