The horizontal rows in the long form periodic table are called periods. There are
1) The number of main shells present in the atom of particular element decides to which period it belongs to.
Eg : i) Hydrogen (H) and Helium (He) atoms contain only one main shell (K). Therefore they belongs to period - 1. ii)The elements Li, Be, B, C, N, O, F and Ne contain two main shells (K and L) in their atoms. Therefore they belong to period - 2.
2) The number of elements in a period depends on how electrons are filled into various shells. Each period starts with a new shell and ends when shell is filled with respect to the 's' and 'p' levels of its main shell.
The first period contains two elements because the K shell contains only one sub-shell i.e., Is, which can accommodate 2 electrons only.
3) The second period starts with the 2nd main shell (L), which has two sub shells 2s and 2p, which can accommodate 8(2 + 6) electrons. Hence second period contains 8 elements.
4) Third period starts with third main shell (M), which has 3 sub-shells 3s, 3p and 3d, but while electrons are being filled into the shell. '3d' gets electrons only after '4s' is filled. Therefore the 3rd period contains again 8 elements by filling 3 s and 3p.
5) Fourth main shell (N) has four sub-shells, 4s, 4p, 4d and 4f but while filling electrons, they are filled in the order 4s, 3d and 4p. Due to this, 4th period contains 18 elements (2 + 10 + 6).
6) Similarly 5th period contains 18 elements, 6th period contains 32 elements.
7) 7th period is incomplete and contains 3 elements from s-block 14 elements from (f-block, 10 elements from d-block, some elements from p-block).
8) The 4f elements (Lanthanoids) and 5f elements (Actinoids) are shown separately at the bottom of the periodic table.