The Prophet (peace be upon him) is the model for the whole of humankind. His attitude towards children was always compassionate and merciful. Being fond of children, the Prophet (peace be upon him) showed great interest in playing with them.
Anas ibn Malik (peace be upon him), the close companion of the Prophet (peace be upon him), mentioned:
"I never saw anyone who was more compassionate towards children than the Messenger of Allah (peace be upon him). His son Ibrahim was in the care of a wet nurse in the hills around Madinah. He (peace be upon him) would go there, and we would go with him, and he would enter the house, pick up his son and kiss him, and then come back." (Muslim)
The Prophet’s love for children was not restricted to his own children and grandchildren. The scope of his mercy and affection embraced all children, and he showed the same interest and gentleness to his Companion’s children.
Some people who were not able to understand the power of expressing love to children wondered why the Prophet (peace be upon him) played with children and took such an interest in them.
A Bedouin came to the Prophet (peace be upon him) and said, "You (people) kiss the children! We don't kiss them." The Prophet (peace be upon him) said, "I cannot put mercy in your heart after Allah has taken it away from it." (Sahih Bukhari)
On another occasion he responded: "He who does not show mercy will not receive mercy." (Al-Bukhari and Muslim)
The Prophet (peace be upon him) was always concerned about everyone’s thought and feeling. The following incident proves his thoughtful character:
The young brother of Anas ibn Malik, used to play with a small bird and it died. The boy was sad, so the Prophet of mercy went to visit him, console him and cheer him up. (Al-Bukhari and Muslim)
The Prophet (peace be upon him) used to frequently visit the Ansar and he would greet their children and stroke their heads. (An-Nasa'i) He (peace be upon him) used to go to the small children and bless them and chew dates for them. (Muslim)
He also used to pray while carrying [his granddaughter] Umamah bint Zaynab. When he prostrated he would put her down and when he stood up he would carry her.
May the blessings and peace of Allah be upon this noble and merciful Prophet.