(B) Mg reacts with water to produce H₂ gas which helps in floating.
Mg reacts with hot water to form magnesium hydroxide and hydrogen gas. The H₂ bubbles stick to the metal surface, making it float.
Source: Chapter 3, Section 3.2.2
---
The textbook explicitly states: "Magnesium does not react with cold water. It reacts with hot water to form magnesium hydroxide and hydrogen. It also starts floating due to the bubbles of hydrogen gas sticking to its surface." Options C and D are wrong gases; Option A is incorrect because Mg is denser than water — it floats only because of H₂ bubbles, not its own density.