Humour is recommended in principle and is deemed to partake in recreation (istirwah) both for the joker and his audience. The Prophet is known to have had a sense of humour and practiced it in his own interaction, words, and action, both with children and adults. It is a condition of a permissible joke, however, that it is clear of lies. Similarly, jokes, whether in words or in action, are either forbidden or reprehensible (mahzur, makruh) if they are tactless and harmful to one's audience or to those who may not be present, or when it involves taking of someone's belonging in the name of a practical joke.
According to the instruction of a hadith: "None of you may take the belongings of your brother, in jest or in earnest." [Abu Dawud] Something that belongs to another person is taken playfully, if done so with the intention of returning it, otherwise it is in earnest and constitutes an offense. The hadith guidelines on humour also proscribe telling a lie even if it be in jest. Thus it is provided that "Faith is not perfect of a believer unless he abandons lying in the jokes he makes and abandons acrimony even if he is truthful." [Musnad]
"The Middle Path of Moderation in Islam: The Qur'anic Principle of Wasatiyyah" - Hashim Kamali