Elements in the same group of the periodic table have the same number of valence electrons. Since valency is determined by the number of electrons an atom can lose, gain, or share to complete its outer electron shell, elements in the same group exhibit the same valency. For example, all elements in Group 1 (alkali metals) have a valency of 1, and all elements in Group 17 (halogens) have a valency of 1 as well.