The number of valence electrons an atom has determines its location in the period: the element with the electron configuration of #"[Ne]"3"s"^2 3"p"^4# has six valence electrons, so within its period of #3# it must be a group #6# element: the element is therefore sulfur. Note that changing the number of valence electrons only affects the position of the element within a period, and once you move down into the next group what were previously valence electrons are valence electrons no longer.
The periodic table can also be divided up into blocks, depending on the highest orbital of an atom of that element's electron configuration. Once more, sulfur's electron configuration is #"[Ne]"3"s"^2 3"p"^4#: its highest orbital is in the #3"p"# sub-level, and so it belongs to the #"p"#-block. Consider, then, that blocks also group elements with similar periodicity, because both block allocation and chemical properties are determined by the valence electrons.