Final answer:
Nonmetals react by sharing electrons to form covalent bonds, enabling the filling of their outer energy shells and the creation of stable compounds.
Step-by-step explanation:
When two nonmetals react, they tend to form a covalent bond by sharing electrons. In a covalent bond, the outermost orbitals of the atoms overlap, allowing the unpaired electrons to be shared. This sharing of electrons fills the outer energy shells of all the bonding atoms, resulting in a stable compound.
For example, hydrogen and chlorine combine by sharing one electron to form the compound HCl. Oxygen, nitrogen, and carbon can also form covalent bonds with hydrogen to complete their octet and create compounds such as H2O, NH3, and CH4.
The reason for nonmetals sharing electrons is because compounds formed between two or more nonmetals tend to have small differences in electronegativity. These substances are molecular in nature and can exist as gases, liquids, or volatile solids at room temperature and pressure.