Salt is not an element but a compound. Sodium chloride, for instance, is a chemical compound having the formula NaCl. It consists of two elements: sodium (Na) and chlorine (Cl).
Chemical compounds are substances composed of at least two distinct chemical components. In the case of table salt, it is a compound as it consists of two distinct components. Salts are ionic substances formed when an acid reacts with a base to neutralise it. In addition to table salt, there are sodium bicarbonate (NaHCO3), sodium hydrosulfide (NaHS), sodium bisulfate (NaHSO4), monosodium phosphate (NaH2PO4), and disodium phosphate (Na2HPO4).