Allah Almighty says in the Quran about the Prophet peace be upon him:
"And you are of a great moral character." (Surah al-Qalam, 4)
Yes, he was adorned with all kinds of good qualities. One of such beautiful behavior is to greet both adults and children.
Anas ibn Malik radiallahu anhu reported:
The Messenger of Allah peace be upon him would pass by young boys and greet them with peace.
The Messenger of Allah peace be upon did not say: 'This is a young boy. Shall I salute this?' But he would greet everyone. We must follow this sunnah and spread the greeting of adults and children widely. How happy that child is!