The Prophet Muhammad completely rejected and condemned the attitude of the pre-Islamic times of ignorance when the girls were hated and the news of the birth of female child was the worst news one could ever expect in his lifetime.
The Quran says about this era:
And when one of them is informed of [the birth of] a female, his face becomes dark, and he suppresses grief. He hides himself from the people because of the ill of which he has been informed. Should he keep it in humiliation or bury it in the ground? Unquestionably, evil is what they decide. (Quran 16:58-59)
The Quran totally changed this attitude of parents towards their children and taught equal treatment towards them, irrespective of their sex or color. All are children and as such are entitled to the same treatment.
In order to change this long established attitude of parents, the Prophet actually leaned more towards female children. His love and affection for his daughter Fatimah (may Allah have mercy upon her) was a bright example.
There are many sayings of the Prophet wherein he has promised a great reward from Allah for bringing up female children nicely and with care.
If anyone has a female child and does not bury her alive, or slight her, or prefer his children (i.e., the male ones) to her, Allah will bring him to Paradise.
And, according to Aisha (May Allah have mercy on her) the Prophet said:
If anyone has suffered at all respecting these girls and treats them well, they will be a covering for him from Hell.
Prophet Muhammad has clearly demonstrated that a girl is not a matter of humiliation to a family. On the other hand, she is a matter of pride. A man who brings up his daughters in a proper way will be among those who have the honor of standing close to the Prophet on the Day of Judgment.
Anas (may Allah have mercy on him) reported Allah’s Messenger as saying:
He, who brought up two girls properly till they grew up, he and I would come (together) (very closely) on the Day of Resurrection, and he interlaced his fingers (for explaining the point of nearness between him and that person).