Elements are held together in different ways and the properties of chemical compounds are determined by the bonding between atoms and the attractive intermolecular forces between molecules.
There are several types of bonding inside molecules (intramolecular bonds) and between molecules (intermolecular bonds).
The intramolecular bonding types have different properties, but all can be arranged into a bonding continuum, where the bonding present inside molecules has varying degrees of ionic character.