The mass given in the periodic table is a weighted average of all isotopes of an element. For example Hydrogen is normally just one proton so one would expect its atomic mass to be exactly 1, but there are other naturally occurring isotopes of H (deuterium with a mass of 2 and tritium with a mass of 3) that have more neutrons resulting in a weighted average slightly greater than 1.