Both hydrogen and oxygen molecules are made up of a fixed number of atoms which are joined together by covalent bonds. Both molecules are diatomic, which implies that each molecule is made up of two atoms joined together by a covalent bond.
A covalent bond is formed between two atoms when each shares one or more electrons previously orbiting the individual atoms. The electrons shared in a covalent bond are always in pairs and it is the mutual attraction of the nuclei of both atoms for the shared electrons that hold the bond together. Covalent bonds confer stability on the molecules and will not normally react with other similar molecules.
Both molecules are non-metals and are colourless gases at room temperature. They are both found in the air we breathe and they both play important roles in human life and survival.