Here's why:
* Absorption: When light from a star passes through its outer atmosphere, certain wavelengths of light are absorbed by atoms in the gas.
* Lines: These absorbed wavelengths appear as dark lines against the continuous spectrum of light emitted by the star.
* Spectral Fingerprint: Each element has a unique set of absorption lines, acting like a spectral fingerprint, allowing astronomers to identify the elements present in the star's atmosphere.