Hydrogen bonding is a force of attraction between a slightly positive hydrogen of one molecule to a slightly negative region of another molecule. An individual hydrogen bond is not very strong, but in large numbers, hydrogen bonds can represent a substantial force of attraction within a substance.
In certain hydrogen-containing compounds, electrons are shared between the atoms of the compound. Some atoms in the compound attract the electrons more strongly than hydrogen; therefore, the electrons spend more time around the atoms that attract them more. This causes the hydrogen regions of a molecule to have slightly positive charges and other areas to have slightly negative charges. The slightly positive hydrogen areas on one molecule attract the slightly negative regions on another molecule, forming hydrogen bonds. Compounds such as water that contain hydrogen bonds tend to have higher boiling points and are thicker or more viscous than expected.