Answer:
D
Step-by-step explanation:
In ionic bonding, attraction occurs between two atoms based on the differences in their electronegativities.
The formation of an ionic bond involves a transfer of electrons from the less electronegative atom usually the metal to the more electronegative atom(non-metal) such that the two kinds of atoms now have a completely filled outer shell like the noble gases.
The transfer of electrons causes the non-metal to be negatively charged and the metal to be positively charged:
Mg → Mg²⁺ + 2e⁻
2,8,2 2,8
O + 2e⁻ → O²⁻
2,6 2,8
Option D shows the valence electrons using the electron dot formula. The ionic bond is perfectly shown by the diagrammatic representation in D.