You could also look at BA or IB flights into Malaga, a couple of hours up the coast from Algeciras. If miles are not a concern, there are a plethora of charter airlines operating into Southern Spain from the UK; Monarch offer a service from Luton to Gibraltar which may be of particualr interest.
The ferry is a good option for Tangier and reasonable for Casablanca/Rabat. The arrival at Tangier certainly delivers you into the real Morocco. If you are heading for Fez, look into a ferry in Melilia instead - the Spanish version of Gibraltar on the Moroccan coast! Onward transport can be a bit basic though. If you are heading for Marrakech flying is a much, much better option as it is a long way by train/road.