Therefore, elements whose atoms can have the same number of valence electrons are grouped together in the periodic table of the elements. As a general rule, a main group element (except hydrogen or helium) tends to react to form a closed shell, corresponding to the electron configuration s2p6.