Diatomic molecules (from Greek di- 'two') are molecules composed of only two atoms, of the same or different chemical elements. If a diatomic molecule consists of two atoms of the same element, such as hydrogen (H2) or oxygen (O2), then it is said to be homonuclear. Otherwise, if a diatomic molecule consists of two different atoms, such as carbon monoxide (CO) or nitric oxide (NO), the molecule is said to be heteronuclear. The bond in a homonuclear diatomic molecule is non-polar.
The only chemical elements that form stable homonuclear diatomic molecules at standard temperature and pressure (STP) (or at typical laboratory conditions of 1 bar and 25 °C) are the gases hydrogen (H2), nitrogen (N2), oxygen (O2), fluorine (F2), and chlorine (Cl2), and the liquid bromine (Br2).