On examining artificial lights it was found that incandescent solids and liquids (including the carbon glowing in a white gas flame) give continuous spectra; gases, except under enormous pressure, give bright lines. If sodium or common salt be thrown on the colourless flame of a spirit lamp, it gives it a yellow colour, and its spectrum is a bright yellow line agreeing in position with line D of the solar spectrum.

In 1832 Sir David Brewster found some of the solar black lines increased in strength towards sunset, and attributed them to absorption in the earth's atmosphere. He suggested that the others were due to absorption in the sun's atmosphere. Thereupon Professor J. D. Forbes pointed out that during a nearly total eclipse the lines ought to be strengthened in the same way; as that part of the sun's light, coming from its edge, passes through a great distance in the sun's atmosphere. He tried this with the annular eclipse of 1836, with a negative result which has never been accounted for, and which seemed to condemn Brewster's view.

History of Astronomy — Part 60

In 1859 Kirchoff, on repeating Frauenhofer's experiment, found that, if a spirit lamp with salt in the flame were placed in the path of the light, the black D line is intensified. He also found that, if he used a limelight instead of the sunlight and passed it through the flame with salt, the spectrum showed the D line black; or the vapour of sodium absorbs the same light that it radiates. This proved to him the existence of sodium in the sun's atmosphere.[4] Iron, calcium, and other elements were soon detected in the same way.

History of Astronomy — Part 60

Extensive laboratory researches (still incomplete) have been carried out to catalogue (according to their wave-length on the undulatory theory of light) all the lines of each chemical element, under all conditions of temperature and pressure. At the same time, all the lines have been catalogued in the light of the sun and the brighter of the stars.

History of Astronomy — Part 60

Another method of obtaining spectra had long been known, by transmission through, or reflection from, a grating of equidistant lines ruled upon glass or metal. H. A. Rowland developed the art of constructing these gratings, which requires great technical skill, and for this astronomers owe him a debt of gratitude.