Group 16 elements contain 6 electrons in their valance shell while group 17 elements contain 7 and group 18 contain 8.
the electronic configuration of the elements are :
sulphur : 2,8,6
chlorine : 2,8,7 and
argon : 2,8,8
sulphur , chlorine and argon contain 6,7,8 valence electrons respectively.
on this basis the elements are positioned in different groups.