a divalent (sometimes bivalent) element, ion, functional group, or molecule has a valence of two. Valency is the number of chemical bonds formed, which may be covalent, polar covalent, or ionic. Examples: ... Divalent cations have a charge of +2, for example Fe2+, Ca2+ and Hg22+.
A covalent compound is a molecule formed by covalent bonds, in which the atoms share one or more pairs of valence electrons. Covalent compounds are made when two or more nonmetal atoms bond by sharing an electron. Covalent bonds are formed when two atoms share electrons. They do this to attain stability and the number of Covalent bonds formed depend upon the electrons present in the outermost shell or it's valency. Eg. CH4 , HF , H2O .