A chemical compound is a chemical substance consisting of two or more different chemically bonded chemical elements, with a fixed ratio determining the composition.
The ratio of each element is usually expressed by chemical formula.
For example, water (H2O) is a compound consisting of two hydrogen atoms bonded to an oxygen atom.
The atoms within a compound can be held together by a variety of interactions, ranging from covalent bonds to electrostatic forces in ionic bonds.
A continuum of bond polarities exist between the purely covalent bond (as in H2) and ionic bonds.
For example H2O is held together by polar covalent bonds.
Sodium chloride is an example of an ionic compound.