Morocco is an Islamic country and the laws and customs reflect this. Be aware and respectful. Especially around religious buildings.
Sex outside of marriage is illegal, couples with no proof of marriage may be given separate rooms in hotels.
Homosexuality is illegal in Morocco, same sex marriage is not recognised and public displays of affection are advised against.
Females are more likely to attract attention than males- dress modestly and be aware of any risks. Our very own Adventure Chief Katy wrote an article about such things here.
Alcohol can only be consumed in licensed places. Drinking on the street and in other unlicensed areas is a punishable offence.