Here's why:
* Group 7A (also known as Group 17) are the halogens. These elements are highly reactive nonmetals that readily form negative ions (anions). Examples include fluorine (F), chlorine (Cl), bromine (Br), iodine (I), and astatine (At).
* Alkaline earth metals belong to Group 2A (also known as Group 2). These are reactive metals that readily form positive ions (cations). Examples include beryllium (Be), magnesium (Mg), calcium (Ca), strontium (Sr), barium (Ba), and radium (Ra).
In summary:
* Group 7A = Halogens (nonmetals)
* Group 2A = Alkaline earth metals (metals)