Why is magnesium used in sparklers?

Since magnesium burns in the air, it emits dazzling white light. Therefore, magnesium powder can be used to make fireworks or flares. Magnesium burns in the air, emitting dazzling white light.