In: Chemistry
According to Octet's rule,
Every element tries to get 8 electrons in its valence shell by gaining or losing or sharing of electrons with other atoms to get stability.
In this regard, since 17th group elements have 7 electrons in their valence shell, to get stability they ready to gain or share an electron. So, they form many compouds.
But 18 th group elements have already got 8 electrons in their valence shell. So, they are already in most stable state. Hence they can not form many compounds with others.
Genereal valence shell electronic configuration of 17th group is ns2np5
Genereal valence shell electronic configuration of 18th group is ns2np6