Why can metals before hydrogen (except potassium, calcium and sodium) react with hydrochloric acid to generate hydrogen?
The activity of magnesium, aluminum, zinc, iron, tin and lead is higher than that of hydrogen. When they react with hydrochloric acid, bivalent positive ions are generated, forming substances that are more stable than hydrochloric acid, such as Mg+2HCl=MgCl2+H2 (where 2 is a corner marker). The law of nature is that substances tend to be stable, so they can react with hydrochloric acid to produce hydrogen.