Here's why:
* Electron Configuration: Halogens are in Group 17 of the periodic table. They have seven valence electrons (electrons in their outermost shell).
* Octet Rule: Atoms strive to achieve a stable electron configuration like that of noble gases. Noble gases have a full outer shell of eight electrons (except for helium, which has two).
* Gaining an Electron: By gaining one electron, halogens complete their outer shell, achieving the stable electron configuration of the nearest noble gas.
For example:
* Chlorine (Cl) has 7 valence electrons. By gaining one electron, it becomes Cl⁻ with 8 valence electrons, like the noble gas argon (Ar).
* Fluorine (F) has 7 valence electrons. By gaining one electron, it becomes F⁻ with 8 valence electrons, like the noble gas neon (Ne).