In general, when a pure substance or mixture goes from liquid to solid, the molecules in it get closer resulting in a higher density.
If this is so why does ice float in water?
Hydrogen bonds in water cause water to freeze with the molecules further apart than they are in the liquid form.
Which is why if you fill a plastic container full of water and freeze it, it invariaby cracks. The ice is actually less dense than the water, and so it floats.