Sagot :
When an element is excited, it produces electromagnetic wave.
The flame depends on the structure/properties/characteristics of the elements because this greatly affects the color of the flame produced.