Secretliker is about right, except that in the gaseous state,
there are negligible forces ‘holding them together’, as they’re not
together at all (by virtue of being in the gaseous state).
To answer Bigcable22’s question, the covalent bonds in ice are
NOT stronger than in water
vapour (because by covalent bonds, you mean the
polar covalent bonds between H and O in a single water molecule –
no reason for the bond enthalpy of these bonds to
change).
Rather, ice is a hard solid, compared to the soft gas of water
vapour, because in the solid state of ice, water has formed a
macromolecular solid, macham like diamond, with a similar
tetrahedral geometry arrangement or lattice structure. The 4 bonds
between each water molecule (visualize the 4 bonds between carbonds
in diamond), are not covalent bonds, as pointed out by secretliker,
but are hydrogen bonds between the partial positive Hs and the
(lone pairs of the) partial negative Os.
It is the remarkable similarity in bond angles (allowed by a
remarkable similarity in bond lengths, as well as the molecular
geometry of the water molecule) that allows water to form a giant
tetrahedral (macromolecular) solid that gives ice its hardness, and
its openness (ie. compared to liquid water, solid ice occupies more
space, hence have lower density and can float on liquid water).