* Sodium (Na) is a metal with one valence electron in its outermost shell. It easily loses this electron to achieve a stable octet configuration.
* Chlorine (Cl) is a nonmetal with seven valence electrons in its outermost shell. It readily gains one electron to achieve a stable octet configuration.
When sodium and chlorine react, sodium loses its electron to become a positively charged ion (Na+), and chlorine gains the electron to become a negatively charged ion (Cl-). These oppositely charged ions attract each other electrostatically, forming a strong ionic bond.
This strong electrostatic attraction between the positive sodium ions and the negative chlorine ions creates a crystalline structure in salt.