As atomic number increases so too does the number of electrons in a neutral atom of the element. The valence electrons are largely responsible for its chemical behavior. If elements having the same number of valence electrons are grouped together the elements in each group or family will have similar chemical properties.
The first short period contains only two elements. These elements fill the K shell. It ends with helium which contains a full K shell consisting of two electrons.
The second short period contains eight elements beginning with lithium and ending with neon. Neon has a complete L shell of eight electrons.
The third short period contains eight elements beginning with sodium. It ends with argon, which contains eight electrons in the M shell.
The fourth period contains eighteen elements beginning with potassium. It includes a series of elements from scandium through copper. These elements are known as transition elements.
They are building the M shell from eight to eighteen electrons. Before this series begins though two electrons enter the outermost N shell. After the series the N shell then builds up to eight electrons ending with krypton.
The fifth period is just like the fourth period in which the O shell takes two electrons then the N shell builds to eighteen electrons before the O shell continues out to eight electrons ending with xenon.
The sixth period contains 32 elements. It too has a transition series beginning with lanthanum and ending with gold, in which the O shell fills to eighteen electrons.
Note however that this series is split after lanthanum with a series of fourteen elements. In these elements the N shell (third from the outside) is filling from eighteen to 32 electrons. These are referred to as the inner transition series, lanthanum series or the rare earth elements. It begins with cerium and ends with lutetium.
Following lutetium the transition series from hafnium to gold completes by building the O shell to eighteen electrons. The outer P shell then continues to build to eight electrons ending with radon.
The seventh period is incomplete. The first two elements, francium and radium fill the Q shell with two electrons. Then the P and O shells fill in the same way as the sixth period. This produces the actinide series.