The only difference between a molecule of a compound and a molecule of an element is that in a molecule of an element, all the atoms are the same. For example, in a molecule of water (a compound), there is one oxygen atom and two hydrogen atoms. But in a molecule of oxygen (an element), both of the atoms are oxygen.