contestada

why do nonmetals near the right side of the periodic table tend to form diatomic molecules with themselves, like cl2 or o2?