Energy level (shell) occupancy

How many electrons can occupy each energy level (shell)?
In general, energy levels (shells) further from the nucleus can be occupied by more electrons.
The maximum number of electrons in the various energy levels (shells)for the first twenty elements is given below:
 
Energy level 1 (shell 1): 2 electrons
Energy level 2 (shell 2): 8 electrons
Energy level 3 (shell 3): 8 electrons
*In advanced chemistry courses you will learn that for elements having atomic number greater than 20, the energy levels (shells) 3 and 4 may contain more than 8 electrons.
 
Note that the maximum number of electrons in each of the first three energy levels (shells) (2, 8, 8)  is the same as the maximum number of elements in each of the first three rows of the periodic table (2, 8, 8).
1 2
  1H 2He
3Li 4Be   5B 6C 7N 8O 9F 10Ne
11Na 12Mg 13Al 14Si 15P 16S 17Cl 18Ar
19K 20Ca 21Sc 22Ti 23V 24Cr 25Mn 26Fe 27Co 28Ni 29Cu 30Zn 31Ga 32Ge 33As 34Se 35Br 36Kr

The first four periods (rows) of the periodic table are shown.
These contain many important elements.

How to predict the number of occupied energy levels (shells)?
In the ground (lowest energy) state for any atom, the electrons on the atom occupy the lowest energy levels (shells) available.

Row 1 elements have either 1 or 2 electrons.
All electrons are in energy level 1 (shell 1).
Row 2 elements have between 3 and 10 electrons. 
Two electrons are energy level 1 (shell 1); the rest are in energy level 2 (shell 2). 
Row 3 elements have between 11 and 18 electrons.
Two electrons are in energy level l (shell 1).
Eight electrons are in energy level 2 (shell 2).
The remaining electrons are in energy level 3 (shell 3).