What mechanism explains the creation of the dark absorption lines observed in a star's spectrum?

Answer

Light passes through a cooler gas containing elements that absorb energy at specific wavelengths.

Bunsen and Kirchhoff established that elements absorb energy at the same specific wavelengths where they emit light; thus, light passing through a cooler layer of gas containing those elements creates dark absorption lines.

What mechanism explains the creation of the dark absorption lines observed in a star's spectrum?

#Videos

What do spectra tell us about stars? - YouTube

Spectroscopyphysicslightastronomystarsstellar properties