Sugar contains glucose. Glucose is a main element in sugar. Sugar also contains lots of sucrose
Sugars contain only three central elements. What makes each sugar different is its molecular structure; for instance, glucose (C6 H12 O6) contains - as you can see, carbon and hydrogen and oxygen. Similarly, sucrose (C12 H22 O11) also contains carbon and hydrogen and oxygen. Even though these sugars are vastly different, they both possess the same elements.