Why do dead bodies float on water whereas the living bodies sink?

because when the dead body is dumped in water, slowly the body absorbs water and the density of the body and water becomes the same.but wheras living bodies is denser than liquid.