When hydrogen reacts with chlorine, hydrogen chloride is formed. Hydrogen chloride is a gas, and has the formula HCl(g).
When hydrogen chloride dissolves in water, hydrochloric acid is formed. This has the same formula, but you can tell the difference because of the state symbol (aq), which stands for ‘aqueous’. The formula is written as HCl(aq).
HCl(aq) → H+(aq) + Cl-(aq)
However, when hydrogen chloride gas dissolves in a solvent called methylbenzene, the molecules do not split up. A solution of HCl in methylbenzene does not contain hydrogen ions, so it is not acidic. The solution also has a low electrical conductivity.