In an atom, shells are distances from the nucleus. The shells that are closest to the nucleus are filled first, and then the higher energy shells farther from the nucleus are filled. In the periodic table, elements in the same row all have the same number of shells of electrons. Hydrogen and helium (H and He) have only one shell of electrons, elements such as lithium in the second row have two shells of electrons, elements such as sodium in the third row have three shells and so forth.