Answer
Yes
Explanation
Magnesium reacts with hydrochloric acid according to the equation:
Mg(s) + 2 HCl(aq) --> MgCl2(aq) + H2(g)
This demonstration can be used to illustrate the characteristic reaction of metals with acid, a single replacement reaction, or to demonstrate the generation of hydrogen gas.
When magnesium reacts with hydrochloric acid, hydrogen gas and soluble magnesium chloride are produced. It takes place because magnesium is more reactive than hydrogen so it displaces it in the chloride compound. Magnesium is oxidized losing two electrons. Hydrogen is reduced from H+ ion to H2 gas when electron from magnesium is transferred to it.