Their work investigated thoroughly some properties of matter and light, discovered by Newton. White light is a mixture of all the colors of the rainbow. It is easy to show that with a prism and obtain a pure spectrum of the white light. The prism deviates the blue light more that the red light, and colors appear in the following order : purple, indigo, blue, green, yellow, orange and red. When he discovered that all these colors were present in the white light, Newton was introducing a fabulous method : spectroscopy.
Matter is able to emit or absorb light : Studying how it is emitted or absorbed by the atoms of a gas, Kirchhoff and Bunsen deduced informations about composition, temperature and density of this gas.
And they found 3 experimental rules :
However, from 1814 the German physicist Joseph von Fraunhoffer observed black lines in the spectrum of the Sun. He drew what he could observe, assigning a letter to each line or groups of lines.

Using the Kirchhoff and Bunsen third rule, it was quite easy to identify which elements were responsible for these dark lines : D1 and D2 lines were caused by sodium, C an F lines by hydrogen, etc.
Kirchhoff deduced that these elements were present in the atmosphere of the Sun and were absorbing their characteristic wavelengths. He published in 1861 the first atlas of the solar spectrum, obtained with a prism ; however, these wavelengths were not very precise : the dispersion of the prism was not linear at all.
In 1869, the Swedish physicist Anders Ångström published a new atlas, obtained with a diffraction grating, whose dispersion is linear, and replaced Kirchhoff's arbitrary scale by the wavelengths, expressed in the metric system, using a small unit (10-10 m) with which his name was to be associated.
A photographic atlas, published by Henry Rowland about 1890, and still currently used, covers a wavelength field ranging from 300 to 700 nm and contains approximately 20 000 lines.
In 1863, a detailed study of the solar spectrum showed new strange lines : they only appeared when the Sun was low above the horizon. Lab experiments, carried on by French astrophysicist Jules Janssen, showed that these lines were caused by the Earth atmosphere.
In 1868, during a very interesting eclipse, Janssen found a new unknown black line in the yellow part of the spectrum.

The British astronomer Norman Lockyer, using the Greek name of the Sun, proposed the name of "helium" for this new unknown element : 27 years later, helium was found down here on our Earth by Ramsey, and we know nowadays that helium is the second more abundant element in the Sun, after hydrogen.
The spectral analysis made possible to know the detailed and precise chemical composition of our Sun, and demonstrated a surprising fact : all elements known on Earth were present there. And you are now ready to use the same method with the light of stars.
Document 2 : You can find in these black and white photographs the visible part of star spectra. On both side of the star absorption spectrum, you can observe, analyse and use the emission line spectrum of argon gas, as a reference for wavelength measurements.
These photographs were taken by Daniel Bardin & Jean Ripert - CLEA Mission -
Observatoire du Pic du Midi
Document 3 : This table indicates the wavelengths of some characteristic lines and elements.