What is absorption line spectra?
Pure light would show you a nice rainbow when spread out. But there are elements that absorb specific wavelengths of light, and if those wavelengths are absorbed, then that smooth rainbow suddenly has a dark line or band in certain places. Buy looking at the spectrum of a star, and looking for where the black lines occur, you can tell which elements are present in that star. Sodium, Sulfer, Carbon, Oxygen – each has a specific wavelength (or sometimes a couple of wavelengths) of light that they absorb. If a star shows the pattern for Carbon, for example – you know that there is a fair amount of carbon in the atmosphere of that star.