Here's a breakdown:
* Electronegativity: Nonmetals have a strong attraction for electrons due to their relatively small atomic radii and high nuclear charge.
* Octet Rule: Nonmetals typically need to gain a few electrons to achieve a stable electron configuration with a full outer shell (often eight electrons). This is known as the octet rule.
* Formation of Anions: By gaining electrons, nonmetal atoms become negatively charged ions called anions.
Examples:
* Chlorine (Cl): A chlorine atom gains one electron to become a chloride ion (Cl⁻).
* Oxygen (O): An oxygen atom gains two electrons to become an oxide ion (O²⁻).
Exceptions:
* Noble gases: Noble gases already have a full outer shell of electrons, so they generally don't form ions or readily react with other elements.
* Hydrogen: Hydrogen is a special case. It can gain an electron to become a hydride ion (H⁻) or lose an electron to become a proton (H⁺).
Important Note: While most nonmetals gain electrons, some can also share electrons in covalent bonds, particularly when reacting with other nonmetals.