Final answer:
Emission and absorption lines in a spectrum can help identify the elements present in stars.
Step-by-step explanation:
When electrons move from a higher energy level to a lower one, photons are emitted, and an emission line can be seen in the spectrum. Absorption lines are seen when electrons absorb photons and move to higher energy levels. Each atom has its own characteristic set of energy levels, which results in a unique pattern of spectral lines. This allows astronomers to determine the elements present in stars and other celestial objects.