What property determines the chemical composition determined from a star's spectrum?

Answer

Absorption lines in its spectrum

Dark absorption lines are created when cooler outer layers of the star absorb specific wavelengths as the continuous spectrum passes through them, acting as a unique chemical fingerprint.

What property determines the chemical composition determined from a star's spectrum?
lightstar