How to make hydrogen gas from magnesium and hydrochloric acid
Hydrogen gas is explosive so it should only be made in a laboratory with a qualified Science teacher or responsible adult present. Safety goggles should always be worn when using an acid and making a gas. Read and follow the directions carefully.
Hydrogen gas is lighter than air so objects like balloons that are filled with hydrogen will rise, like the dirigible the Hindenburg. Unfortunately Hydrogen gas is also very reactive and the result was that the Hindenburg exploded into flames. Modern dirigibles use Helium gas which is inert and not explosive.
The pop test
A simple test can be used to confirm that the gas produced is hydrogen. Collect gas in the test tube by keeping the top of the test tube covered. Then put a match in the gas. If it is carbon dioxide, the match will go out. If it is oxygen, the match will burn brighter. If the gas is hydrogen there will be a small explosion and a pop will be heard.
The reaction that creates the Hydrogen gas is:
2Mg + 2HCl —>H2 + 2MgCl
where Mg is magnesium, HCl is hydrochloric acid, H2 is hydrogen gas and MgCl is the salt, magnesium chloride.
Reaction of hydrochloric acid and magnesium and the test for hydrogen.