Thank you for your query,
Black color stool is a concerning issue.
Black color stool is due to a upper gastrointestinal bleeding
or due to taking any oral iron supplementation.
If your child is not taking any oral iron supplementation, stool should be examined for red blood cells by routine stool examination.
So consult your Pediatrician
And for constipation
, dietary fiber
rich foods like vegetables, green leafy vegetables and fruits to be added and give plenty of oral fluids on regular daily basis.
During passing hard stools you can give oral lactulose
as per prescription for 3 to 5 days and once the stool becomes soft and loose , you can stop it.
Hope I have answered your query.