Confusion with the Periodic Table 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?
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?


Indeed, elements of the same period have the same number of electron shells, but the "problem" is that in accordance with the Madelung/Janet/Klechkowski  rule, the $\mathrm{4s}$ orbital is occupied before the $\mathrm{3d}$ orbital. As a result, the $\mathrm{3d}$ orbital could be filled only when the $\mathrm{4s}$ orbital is already filled, i.e. only for elements of the 4th period.

Similarly, the $\mathrm{5s}$, the $\mathrm{5p}$, and the $\mathrm{6s}$ orbitals are occupied before the $\mathrm{4f}$ orbital. As a result, the $\mathrm{4f}$ orbital could be filled only when the $\mathrm{5s}$, the $\mathrm{5p}$, and the $\mathrm{6s}$ orbitals are already filled, i.e. only for elements of the 6th period.