Write a chemical reaction for metals with dil. HCl.
Less reactive metals do not displace hydrogen from the acids. Reactive metals like sodium, magnesium etc displace hydrogen from acids to form respective chlorides.
Reaction:
2Na + 2HCl → 2NaCl + H2
Mg + 2HCl → MgCl2 + H2