Final answer:
Nonmetals in groups 6A and 7A of the periodic table gain electrons to form anions with a 2- charge and a 1- charge respectively, following the electron configuration of the next noble gas.
Step-by-step explanation:
The nonmetals in groups 6A (16) and 7A (17) of the periodic table tend to gain electrons to form anions. In particular, Group 6A nonmetals gain two electrons to achieve a 2- charge, mirroring the electron configuration of the next noble gas. For example, oxygen gains two electrons to become O²-.
Similarly, Group 7A nonmetals, also known as the halogens, gain one electron to form anions with a 1- charge. An element like bromine would gain one electron to become Br⁻, with the electron configuration of krypton, the following noble gas.
Main-group nonmetals are characterized by their tendency to form negative ions by gaining electrons, unlike metals, which typically lose electrons to form cations.