Sodium chloride NaCl is an ionic compound. An ionic compound is formed when there is a transfer of electrons between a metal and a non-metal, resulting in the formation of positively charged ions cations and negatively charged ions anions . These ions are held together by strong electrostatic forces of attraction, known as ionic bonds.In the case of sodium chloride, sodium Na is a metal from Group 1 of the periodic table, and chlorine Cl is a non-metal from Group 17 also known as the halogens . Sodium has one electron in its outermost shell, while chlorine has seven electrons in its outermost shell. To achieve a stable electron configuration, sodium loses its one valence electron, forming a positively charged sodium ion Na+ , and chlorine gains one electron, forming a negatively charged chloride ion Cl- . The electrostatic attraction between the Na+ and Cl- ions forms the ionic bond in NaCl.In contrast, covalent compounds are formed when non-metal atoms share electrons to achieve a stable electron configuration, and metallic compounds consist of metal atoms bonded together in a lattice structure with a "sea" of delocalized electrons.Thus, sodium chloride NaCl is an ionic compound due to the transfer of electrons between the metal sodium and the non-metal chlorine, resulting in the formation of oppositely charged ions that are held together by ionic bonds.