How is the octet rule used in covalent bonding?
In covalent bonding between atoms, the shared electrons are counted in the valence shells of both atoms.
Cl (Group 17) makes 18 – 17 = 1 covalent bond. The dashed line represents the shared pair of electrons that counts toward the octet of each Cl atom.
O (Group 16) makes 18 - 16 = 2 covalent bonds
N (Group 15) makes 18 - 15 = 3 covalent bonds.
C (Group 14) makes 18 - 44 = 4 covalent bonds.
Atoms can also form double and triple covalent bonds to give the atoms their octets.