Would an American iPhone 5 work in the UK?

I'm going to Florida in a few weeks and was wondering if I bought an unlocked iPhone 5 in an apple store whilst I'm there, would it still work properly if I inserted an O2 sim when I got home?

I've been researching a little and on the US Apple website it said the unlocked iPhone 5 is available to any GSM carrier. So will O2 work?

You would probably be better off trying to get an unlocked one from the UK. There are 3 variants of the iPhone 5.

The GSM, the CDMA & the GSM worldwide (which is what the UK would offer).

Yes it would work, but I still think you'd be better off with what I described.

Yes as long as the carriers are compatible (GSM - GSM or CDMA-CDMA). And as long as the iPhone has been unlocked.