Element is known as a form of matter that is made up of the same kind of atoms, whereas a compound can be derived from the same type or from a different type of atoms or elements chemically bonded together.
On the other hand, the mixture is also composed of same or different types of atoms, but they are not chemically bonded.
Sugar is a compound that is formed by a combination of three atoms: Carbon, Hydrogen, and Oxygen, for which the formula is given by ; .
As these three atoms are chemically joined with each other thus they form, sugar as a compound in nature.