Acids are prepared from non-metals by their oxidation.
For example :
Sulphur or phosphorus is oxidized by conc. Nitric acid to form sulphuric acid or phosphoric acid.
S + 6HNO3 H2SO4 + 2H2O + 6NO2
P + 5HNO3 H3PO4 + H2O + 5NO2
Acids are prepared from salt by displacement reaction.
For example :
Nitric acid is prepared by using H2SO4 and sodium chloride.
NaCl + H2SO4 NaHSO4 + HNO3