Hydrogen-bonding forms in liquid water as the hydrogen atoms of one water molecule are attracted towards the oxygen atom of a neighboring water molecule; generally, a proton shared by two lone electron pairs. ... This attraction is the basis of the 'hydrogen' bonds.