The periodic table lists the elements in order of atomic number, in rows called periods and columns called groups. Elements in the same group behave alike, because they have the same number of electrons in their outer shell.
Electrons sit in shells around the nucleus. For the first 20 elements the shells fill 2, then 8, then 8: oxygen (8 electrons) is 2, 6 and sodium (11) is 2, 8, 1. The outer electrons, the valence electrons, are the ones that take part in reactions. For the main groups you can read the count from the group: group 1 has 1, group 2 has 2, and groups 13 to 18 have 3 to 8.
Atoms are most stable with a full outer shell, which for most means eight electrons (the octet rule; hydrogen and helium are happy with two). Group 18, the noble gases, already have full shells, so helium, neon and argon hardly react at all. Group 1, the alkali metals, have one spare electron they give up easily; group 17, the halogens, are one short and grab one.
Metals sit on the left and in the middle. They give up electrons, conduct electricity and form positive ions. Nonmetals sit on the upper right; they gain or share electrons. The staircase line between them has the in-between metalloids such as silicon.
Two trends matter all through chemistry. Electronegativity, how hard an atom pulls on shared electrons, rises to the right and up the table: fluorine is the highest, then oxygen, then nitrogen and chlorine. Atom size does the opposite: it grows down a group (more shells) and shrinks across a period (more protons pulling the same shell in).
Practice
Oxygen is in group 16. How many valence electrons does it have?
More info
Quick reference
Period
A row.
Group
A column: same number of valence electrons.
Valence electrons
Electrons in the outer shell.
Octet rule
Atoms tend toward eight outer electrons.
Electronegativity
Pull on shared electrons: up and right is higher.
Noble gases
Group 18: full shells, unreactive.
The other chemistry and chemical engineering courses