Are elements with the same number of valence shell electrons located in the same family or period?

What is a FAMILY? PERIOD?

Family means column.

Period means row.
For example, the halogen FAMILY in column 17 (F, Cl, Br, I, At) all have seven electrons in their valence shell.
The second PERIOD (period 2) consists from left to right of Li, Be, B, C, N,O, F, Ne.