Lime water is used for detection of carbon dioxide and this liquid turns milky white when carbon dioxide is bubbled through it. Lime water is a solution of calcium hydroxide,`Ca(OH)_2` in water. When carbon dioxide is mixed with this solution, carbonate ions (`CO_3^(2-)` ) are produced, which react with the calcium ions (`Ca^(2+)` ) and calcium carbonate (`CaCO_3` ) is produced. The chemical reactions can be written as:
`CO_2 (g) + H_2O (aq) -> 2H^+ (aq) + CO_3^(2-) (aq)`
`Ca^(2+) (aq) + CO_3^(2-) (aq) -> CaCO_3 (s)`
Calcium carbonate is a precipitate and is a white color solid. The formation of this precipitate in the lime water, turns it milky and carbon dioxide presence is detected.
We can also try the same experiments with other gases to see if we obtain the same results.
Hope this helps.