Halogens are a group of elements that include fluorine, chlorine, bromine, iodine, and astatine. When halogens react with metals, they tend to form salts. Salts are a type of compound that is formed when an acid and a base react with each other. In the case of halogens and metals, the halogen acts like an acid and the metal acts like a base. The halogen donates an electron to the metal, which forms a positively charged ion, and the halogen becomes negatively charged. These two oppositely charged ions then combine to form a salt. For example, when chlorine reacts with sodium metal, they form sodium chloride, which is table salt.