Sodium chloride contains ionic bonds between sodium and chloride ions.Sodium has one electron in its outer shell, whereas chlorine has 7. Atoms are happiest when they have a full outer shell of electrons. Sodium can do this by giving up its electron in the outer shell, leaving the shell before it which is full. This electron is transferred to chlorine, giving it 8 electrons in its outer shell, meaning it is full.Due to the different numbers of electrons and protons in the sodium and chlorine, sodium has a +1 charge, and chlorine has a -1 charge and is now called chloride. These opposite charges attract and there is an electrostatic force of attraction between them, which is the ionic bond.