Education

If I take out withdrawals from the 529 and use it towards room and board and then the actual tuition fees/ books paid to the school use that to take the AOC or lifetime credit? Would that not be taxable that way?

i had no idea that when i opened this 529 that I would  not be able to take the education credits on tax return , i was thinking this was more like a savings account. I put after tax dollars in this account and to have to pay a penalty tax now on it , just seems crazy