For 5th period, principal quantum number, n = 5 and values of azimuthal quantum number, l = 0, 1, 2, 3
Now, filling of orbitals in sub-shells takes place in order of increasing energy of the sub-shell.Since, energy of 4f sub-shell is higher than 5s sub-shell, the sub-shells available for filling are 5s, 4d and 5p
Total number of orbitals = 1 for 5s + 5 for 4d + 3 for 5p
= 1+ 5 + 3
= 9
Therefore, total number of electrons that can be accommodated in 9 orbitals = 9 x 2 = 18
Hence, the number of elements in 5th period is 18.