The diagram shows that the periodic table can be used as a guide to the sequence in which the subshells are occupied.
Consider the electron configuration for O:
1s2 2s2 2p4
Oxygen is a second row element. Thus the first shell is fully occupied, and the second shell partly occupied.
Note that the sum of the superscripts in the electron configuration equals the total number of electrons on the atom.

The electrons on an atom are either .
valence electrons (may be involved in bonding) or
core electrons (not involved in bonding).
For main group elements (Groups 1 and 2, Groups
-
the valence electrons are those in the outermost
s and
p subshells.
For boron (1s2 2s2 2p1)
The two electrons in the 1s orbital are core electrons.
The three electrons in the second shell are the valence electrons.
For the first row transition metals, the core corresponds to the configuration of argon, the Noble gas from the previous row.
The valence electrons are both those in the incomplete
d subshell and the
s electrons in the highest occupied shell.
For titanium (1s2 2s2 2p6 3s2 3p6 3d2 4s2)
The 18 electrons in inner complete subshells are core electrons.
The 4 electrons in the outermost s subshell and the incomplete d subshell are valence electrons.