In covalent bonding, electrons are shared between atoms of the same or different elements, such that each atom contributes to the shared electron so as to attain a stable or noble gas configuration. Covalent molecules are usually formed among atoms of hydrogen or non-metals of groups 4, 5, 6, and 7. Examples of covalent bonding are the formation of the hydrogen molecule, chlorine molecule, oxygen molecule, nitrogen molecule.
A hydrogen bond is an unusually intermolecular attractive force; it is a special dipole-dipole force. Examples of hydrogen bonds are HF, H2O, and NH3. Hydrogen bonds occur between hydrogen atoms that are covalently bonded to small and highly electronegative atoms. When writing did hydrogen bond, they are represented with dotted lines. A hydrogen bond is among the most common intermolecular forces.