"Inna Lillahi wa inna illaihi raaji' oune"
Salatul Janazah is Fard Kafayah, that is, if one prays the prayer than all are bareeuz zimma [free of the responsiblity] otherwise all those who received the news but did not come are sinners. Jammat is not a condition for this prayer, it is sufficient even if one person prays, and to deny the fardiat, compulsion, of this salah is kufr, an act of disbelief.
There are two parts of this Salah:
1) To say Allahu Akbar four times
2) Qayam which was three Sunnat Mukeda: Sana, Durood Shareef, and Duaa for the deceased
How to pray
Muqtadee should make the niyyat, “I make the niyyat for the prayer of this janaza for Allah, duaa for this deceased, behind this imam.” Now the Imam and muqtadee should raise their hands to their ears and fold their hands underneath the navel as usual whilst saying Allahu Akbar and read Sana, a slight difference is that after wa ta’aala jadduka one must read wa jalla sanauka wa laailaha gairuk. Then without raising the hands, say Allahu Akbar and read durood Ibraheem; then without raising the hands, say Allahu Akbar and read the duaa. The Imam must say all the takbeer aloud whereas the muqtadee must say it slowly, the rest of the azkar (supplications) are to be read slowly by the Imam and Muqtadee. After the duaa, say Allahu Akbar and now drop the hands and then turn the head both sides for salaam.
Glory be to You Oh Allah, and praise be to You, and blessed is Your name, and exalted is Your Majesty, and there is none to be served besides You.
O Allah! shower Your mercy upon Muhammad and the followers of Muhammad , as You showered Your mercy upon Ibrahim and the followers of Ibrahim. Behold, Your are Praiseworthy, Glorious.
Oh Allah! Shower Your blessing upon Muhammad , and the followers of Muhammad as You showered Your blessings upon Ibrahim and the followers of Ibrahim. Behold, You are Praiseworthy, Glorious.
Duaa for an adult man or woman:
Oh Allah! Forgive those of us that are alive and those of us that are dead; those of us that are present and those of us who are absent; those of us who are young and those of us who are adults; our males and our females. Oh Allah! Whomsoever You keep alive, let him live as a follower of Islam and whomsoever You cause to die, let him die a Believer.
Duaa for a boy:
Oh! Allah, make him (this child) a source for our salvation and make him a source of reward and treasure for us and make him an intercessor for us and one whose intercession is accepted.
Duaa for a girl:
Oh! Allah, make her (this child) a source for our salvation and make her a source of reward and treasure for us and make her an intercessor for us and one whose intercession is accepted.
12 Ahkams of Janazah
1) Some people pray while wearing shoes and many people pray Janazah while standing on the shoes. If one prays wearing the shoes then it is necessary that the shoes and the earth underneath be pure and if one stands on the shoes then it is necessary that the shoes be pure.
2) There is more ihtiyat (care) that one does not pray while standing on the shoes. Stand on the earth, if you want you can stand upon your handkerchief.
3) It is necessary for the body of the deceased to be present; the janazah of the absent is not permissible
4) It is mustahab that the Imam stand in front of the chest of the deceased.
The Order of Going with the Janazah Procession
1) It is an act of ibadat to give shoulder to a janazah
2) It is sunnat to give shoulder to all four legs ten steps each in such a manner that one shoulders the top head-right first, bottom leg-right second, then top head-left third, and then bottom-leg left last making a total of forty steps. It is in a Hadith Shareef that, “Whoever took the Janzah forty steps, his forty large sins will be forgiven.” It is also in a Hadith Shareef that, “Whoever shoulders all four legs, Allah will give him permanent maghfirat (forgiveness).” [Alamgeeri]
3) There is no harm if one person holds a small child in his arms and people hold the deceased one after the other. [Alamgeeri]
4) It is not permissible nor allowed for ladies to go with the Janzah. [Bahare Shariat]
5) One should not return without praying the Janzah if he is with the Janzah, and he may return after the prayer with the permission of the awliyae mayyat and there is no need for permission after the burial. [Alamgeeri]
6) A husband may shoulder his wife’s janazah, lower it into the grave, and see the face. He may not give his wife gusul or touch her without anything between the body. The wife may give her husband ghusul. [Bahare Shariat]