Human’s humanity is inborn, for this reason, contrary to his being Muslim which is not inborn and it is given to him, his humanity is indispensable in him. Moreover, a human can imagine that he is not Muslim like many other Muslims that are living in this world.so the child who is born from a human is innately human, but so long as he is not seven years old and hasn’t accepted Islam officially, he is not Muslim, however if his father, mother or his grandfather or one of them was Muslim he is counted as Muslim.
Of course, based on documented narration every child that come into existence, in his nature he is seeking Allah and if he is placed in a proper situation he would certainly accept Islam, but at times the parents and also the society with their incorrect teachings deviate him from the correct path.
source : erfan.ir