Electronegativity is the tendency of an atom to attract electrons in a bond. Atoms with higher electronegativity values attract electrons more strongly. Ionic bonds form between metals and nonmetals when the nonmetal has a higher electronegativity and takes electrons from the metal. Covalent bonds form between nonmetals which share electrons. Covalent bonds can be polar or nonpolar depending on the difference in electronegativity values and molecular geometry. Hydrogen bonds form between polar molecules with partial charges, such as between hydrogen and oxygen or nitrogen.