Spectral lines are dark or bright lines in a spectrum that correspond to specific wavelengths of light. They occur due to:
- Absorption of light by elements in a star's atmosphere
- Emission of light from excited atoms
Each element has a unique set of spectral lines, acting like a cosmic fingerprint.