<!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}-->
Magnesium metal slowly dissolves in HCl with the evolution of colourless and odourless gas. This gas burns off with a popping sound. Therefore, the chemical reaction involved can be written as:
Mg+2HCl→MgCl2+H2