Ionic bonds are formed by the complete transfer of electrons from one atom of an element to another atom element and such compounds are known as ionic compounds.
Ionic bonds are mostly formed between metal and non-metals.
Metals donate electrons while non-metals accept the electrons.
Most ionic compounds are neutral compounds.
Formation of ionic compound Sodium Chloride:
The atomic number of Sodium is and has an electronic configuration . It has only one electron in its outer shell to attain stability and complete the octet it has to donate one electron or accept seven electrons from other atoms. As Sodium cannot accepts seven electrons from other atoms due to its small size, so it donates one electron to other elements.
The atomic number of Chlorine is and has an electronic congfiguration . It has seven electrons in its outer shell to attain stability and complete the octet, it has to donate seven electrons or accept one electron. As Chlorine cannot donate seven electrons due to its high electronegativity, so it accepts one electron from other elements to complete the octet.
When there is the formation of a bond between Sodium() and Chlorine() takes place, there is a complete transfer of electrons from Sodium() to Chlorine() resulting in Sodium chloride() formation.
Here, Sodium() acts as metal and donates an electron while Chlorine() acts as a non-metal and accepts electrons.