Salt is an ionic compound made up of one atom of chlorine for each atom of sodium. Its chemical formula is NaCl, and it’s also known as sodium chloride.
Sodium and chlorine are ionic solids, which means they are held together by ionic bonding. This happens when negatively charged ions are attracted to positively charged ions. Positively charged sodium and negatively charged chlorine create halite crystals when they are bound. The 1:1 ratio of this ionic compound makes for a stable bond. These crystals take on the shape of the cube, because the ions within the structure alternate between positive and negative charges to form a cubic structure.