Elements in the same period have the same number of electron shells or energy levels, which corresponds to their row on the periodic table. However, they differ in the number of protons, electrons, and chemical properties.
As you move from left to right across a period, the number of protons increases, leading to a stronger nuclear charge, which influences the size of the atoms and their reactivity.