Variation along the period
The number of valence electrons increase from left to right in a period. So, the valency of the elements first increase from 1 to 4 and then decreases to zero.
Variation down the group
On moving down the group the number of valence electrons remain the same and therefore all the elements in the group exhibit the same valency.