The law of conservation of mass applies to every reaction. In this case, you start with 1 Mg, 2 H, and 2CL and end up with the same five only their bonds have been rearranged, or in other words, they are joined up differently.
The density of carbon dioxide would be 0.00196 g/mL