It began when Dr Rashad Khalil, an expert on Islamic law from al-Azhar university in Cairo warned that being completely naked during intercourse invalidates a marriage. His ruling was promptly dismissed by other scholars, including one who argued that "anything that can bring spouses closer to each other" should be permitted.

Another religious scholar suggested it was OK for married couples to see each other naked as long as they don't look at the genitals. To avoid problems in that area, he recommended having sex under a blanket.

It's not entirely clear whether Dr Khalil has considered the full implications of his edict. Doesn't the prospect of all those virile baton-wielding Egyptian riot policemen (for example) doing it in their boots and black uniforms sound just a little bit kinky? But we'll let that pass.

Unlike Christianity, which tends to be squeamish about sex, Islam has a long tradition of talking about it openly. Up to a point, this is much more healthy. While Catholic priests are enjoined to remain celibate, Muslim clerics are expected to marry and indulge heartily with their wives in the pleasures of the flesh. In many parts of the Muslim world, especially where folk are poor and uneducated, the local imam is the person many turn to for guidance on matters relating to sex and marriage.

Over the last few years, hundreds of Islamic "fatwa" websites have also sprung up on which clerics - often with uncertain qualifications - answer all manner of questions that have been sent to them by email, including questions about sex. Some of their answers about what "good Muslims" should or shouldn't do in bed are very explicit, so readers under 18 should stop here. While some of the advice is sensible, a lot of it is completely daft, so remaining readers over the age of 18 may wish to get a second opinion before putting it into practice.

Actually, it had never occurred to me that Muslims might be required to keep their clothes on during their most intimate moments until a few months ago when I was browsing through IslamOnline, the website supervised by the prominent (and controversial) Qatar-based cleric, Yusuf al-Qaradawi.

Delivering a fatwa on oral sex, 79-year-old Dr Qaradawi describes it as a disgusting western practice, resulting from westerners' habit of "stripping naked during sexual intercourse". But he continues: "Muslim jurists are of the opinion that it is lawful for the husband to perform cunnilingus on his wife, or a wife to perform the similar act for her husband (fellatio) and there is no wrong in doing so. But if sucking leads to releasing semen, then it is makruh (blameworthy), but there is no decisive evidence (to forbid it) ... especially if the wife agrees with it or achieves orgasm by practising it."

On this issue, Dr Qaradawi's views are more permissive than those of several other clerics on the internet. One states that oral sex is definitely forbidden, adding that "this hideous practice will draw the anger of Allah". Another, asked if oral sex is permitted, replies: "I don't know what is oral sex, please define it."

Masturbation is generally frowned upon by Islamic scholars, though they disagree about how sinful it is. The Inter-Islam website describes it as an indecent practice that has "crept into the youngsters of today". Masturbation has become prevalent, the website says, because of the modern tendency for young people to marry later (contrary to the advice of the Prophet). As a result, they feel a need "to fulfil their carnal desires but ... cannot do so in the normal way, ie sexual intercourse". Islamic Voice describes masturbation as an "abominable and wicked act" which is forbidden in Islam. "Its harms are great and it has disastrous consequences as established by doctors."

The "proven" medical effects of masturbation - which, of course, include damage to the eyesight - were once listed by Abd al-Aziz bin Baz, the late Grand Mufti of Saudi Arabia, and his list is reproduced on numerous Islamic websites. According to bin Baz, masturbation causes disruption of the digestive system, inflammation of the testicles, damage to the spine ("the place from which sperm originates"), and "trembling and instability in some parts of the body like the feet". In addition, there is a weakening of the "cerebral glands" leading to decreased intellect and even "mental disorders and insanity". Furthermore, "due to constant ejaculation, the sperm no more remains thick and dense as it normally occurs in males". This results in sperm which is not "mighty enough" to make a woman pregnant or produces children who are "more prone to disease and illness".

Other scholars argue that masturbation is basically forbidden but may be permitted if the person is unmarried or masturbates in order to avoid a more serious sin such as adultery, or if the masturbation is to release "sexual tension" rather than to fulfil "sexual desire". In a fatwa for IslamOnline, Sheikh Mustafa al-Zarqa says: "I conclude that the general principles of sharia [Islamic law] go against this habit, because it is not the normal way of fulfilling sexual desire ... it is a deviation - and that is enough to condemn it, even though this act does not fall under the category of absolute prohibition."

There is generally more consensus among scholars on the question of kissing. Males and females should not kiss unless they are related by blood or marriage. Same-sex kissing, on the other hand, is allowed as long as it is done without "lust" and avoids the person's mouth. Hands and cheeks are the preferred places to kiss. The forehead is also good because the Prophet reportedly once gave a man a smacker between the eyes.

In this context, the ethics of kiss-of-life resuscitation are considered by IslamOnline. The website quotes Dr Ahmad Muhammad Kan'an, head of the infectious diseases department at the Primary Medical Care Administration in the eastern region of Saudi Arabia: "The kiss of life is legally permissible because it is a means of resuscitation, if Allah wills. Yet, it goes without saying that it is impermissible unless necessary. So, if it is certain that the victim has already died, mouth-to-mouth resuscitation becomes impermissible, for there is no necessity in such a case." While administering the kiss of life, IslamOnline adds, rescuers should be careful to do it with "neither lust nor pleasure".

There is much disagreement on Islamic websites about anal sex between men and women. Grand Ayatollah Ali Sistani, the highest-ranking Shia cleric in Iraq, says it is "strongly undesirable", but permissible if the wife agrees. This seems to be quite a common view, though many Sunni clerics maintain that consent is irrelevant. "Anal sex is a grave sin and is completely forbidden, regardless of whether the wife agrees to it or not," one says.

The most common religious objection to anal sex is that it frustrates the main purpose of marriage - to produce children - and the same objection is applied to masturbation. "Islam strictly forbids the waste of seminal fluid," one website says.

It is precisely to avoid having too many children that some Muslims practice anal sex. One man, writing to the Islamic Q&A website, says that his wife doesn't have any problem with it. "I think this is the best way of family planning instead of using condoms," the man writes, though he adds that many of his friends have told him otherwise. "People are confusing me so please tell me what to do." Mufti Ebrahim Desai replies: "The futile excuse of it being better than a contraceptive doesn't carry any weight. If you are justified in using a contraceptive, then there are many different options on the market which could be adopted, instead of this hideous practice."

Although Muslim scholars regard pregnancy as the primary goal of sex and marriage, they are generally more pragmatic than the Roman Catholic church about family planning. Contraception is allowed, though the rules can be rather complicated.

Shia clerics often seem to be more flexible in sexual matters than Sunnis. For example, "temporary marriage" is a Shia tradition which in effect legalises prostitution. Sunni clerics, especially those influenced by Saudi Wahhabism, like to assert their authority by forbidding anything that might be remotely pleasurable.

Much of the discussion is sadly reminiscent of the old Christian debate about the number of angels that can dance on a pinhead, but sex is only one part of the problem. The current fashion for online fatwas has created an amazingly legalistic approach to Islam as scholars - some of whom have only a tenuous grip on reality - seek to regulate all aspects of life according to their own interpretation of the scriptures. It is much harder to find any discussion on Muslim websites of matters that some would say form the basic substance of religion, such as the nature of love and spiritual experiences.