Deductions & credits

Hello I have been in prison for the first 6 months of the year and worked for the last 6 months of the year IRS saying I can not get credit for claiming a child is this true even though I worked for six months and took care of my kids and they lived with me