The periodic table has 7 periods and they have 2,8,8,18,18... elements respectively from 1 to 7. But from what I understand, the periods each state the number of electron shells that the elements in that period has. So if that is the case, shouldn't period 3 have more elements, since it can hold up to 18 electrons, and therefore it can have up to 18 more protons from the largest atomic number element in period 2? (Since period 3 has a M electron shell, it can also have a p orbital, and in total therefore can have 18 elements.)
The same could be said for elements in group 4, group 5, group 6 and so on since they can have f,g, and h orbitals as well. Am I missing something here?