The sunnah is to raise the grave at least one hand above the ground so it is known that it is a grave. It is forbidden to raise it more than that. This is based on a narrative reported by Muslim and others from Harun that Thamamah ibn Shufayy told him: "Once we were with Fadalah bin 'Ubayd in the Roman land of Brudis. One of our companions died and upon burying him we were ordered by Fudalah ibn 'Ubayd to level his grave. Then Fudalah said: 'I heard Allah's Messenger, peace be upon him, ordering people to level the graves of the deceased." It is reported from Abul al-Hayaj al-Asadi who said 'Ali bin Abu Talib told me: "Should I not instruct you to do as the Messenger of Allah, peace be upon him, instructed me? Do not leave a statue standing without removing it. Do not leave a grave raised without leveling it."
Tirmizhi said: "Some scholars act upon this opinion. They disapprove of raising the grave more than necessary to indicate that it is a grave, and so people will not step or sit on it." Muslim governors used to destroy cemetery structures not permitted by the law, in accordance with the authentic sunnah. Ash-Shafi'i said: "I prefer that the soil used for a grave be no more than that dug for that grave. I like to see a grave raised above the ground the length of a hand or so. I prefer not to erect a structure over a grave or to whitewash it, for indeed this resembles decoration and vanity, and death is not the time for either of these things. I have never seen the graves of the Muhajirin or Ansar plastered. I have seen the Muslim authorities destroying structures in graveyards, and I have not seen any jurists object to this."
Placing a Distinguishing Mark on a Grave:
It is permissible to place a mark, such as a stone or a piece of wood, over a grave so that it can be recognized. This is based on a hadith reported by Ibn Majah from Anas that the Prophet, peace be upon him, "placed a rock over 'Uthman ibn Maz'eun's grave so that it could be recognized."
Building Mosques or Placing Lights on Graves:
There are many sound and clear hadith conceming the unlawfulness of building mosques over graves or putting lights on them. Abu Hurairah reported: "The Prophet, peace be upon him, said: 'May Allah destroy the Jews, because they used the graves of their prophets as places of worship.'' (Bukhari and Muslim)
Ibn 'Abbas reported: "The Messenger of Allah, peace be upon him, cursed the women who visit graves and those who build mosques and place lights on them.'' (Reported by Ahmad and other compilers of the Sunan)
Slaughtering Animals on the Graves:
The Prophet, peace be upon him, forbade the slaughtering of animals at graves, which was practiced in the Days of Ignorance out of arrogance and self conceit in order to flaunt one's wealth. Anas reported: "The Prophet, peace be upon him, said: 'There is no slaughtering (of animals on graves) in Islam.'' (Abu Daw'ud)
Prohibition of Sitting, Leaning, and Walking on Graves:
It is not permissible to sit on a grave, or lean on it, or walk over it. This is based on a hadith reported by 'Amr bin Hazm who said: "The Prophet, peace be upon him, saw me leaning on a grave, so he said: 'Do not harm the dweller in this grave or do not harm him.''' (Reported by Ahmad, who considers its chain of narrators as sound) Abu Hurairah reported: "The Prophet, peace be upon him, said: 'It is better for you to sit on a glowing coal that burns through your clothes to your skin than to sit on a grave.'' (Reported by Ahmad, Muslim, Abu Daw'ud, Nasa'i, and Ibn Majah)
Prohibition of Whitewashing or Writing on a Grave:
Jabir reported: "The Prophet, peace be upon him, forbade the whitewashing of a grave, sitting on it, or erecting any structure on it." (Reported by Ahmad, Muslim, Nasa'i, Abu Daw'ud, and Tirmizhi who said that it is a sound hadith) Tirmizhi reported this hadith with this wording: "The Prophet, peace be upon him, forbade the whitewashing of graves, writing on them, building on them, or stepping on them." Nasa'i, reported it in these words: "The Prophet, peace be upon, forbade building over a grave, adding anything to it, white washing it, or writing on it."