By 1814, Fraunhofer had invented the modern spectroscope. In the course of his experiments, he discovered a bright fixed line which appears in the orange color of the spectrum when it is produced by the light of fire. This line enabled him afterward to determine the absolute power of refraction in different substances. Experiments to ascertain whether the solar spectrum contained the same bright line in orange as the line produced by the orange of fire light led him to the discovery of 574 dark fixed lines in the solar spectrum. Today, millions of such fixed absorption lines are now known.
Continuing to investigate, Fraunhofer detected dark lines also appearing in the spectra of several bright stars, but in slightly different arrangements. He ruled out the possibility that the lines were produced as the light passes through the Earth’s atmosphere. If that were the case they would not appear in different arrangements. He concluded that the lines originate in the nature of the stars and sun and carry information about the source of light, regardless of how far away that source is.  He found that the spectra of Sirius and other first-magnitude stars differed from the sun and from each other, thus founding stellar spectroscopy.
These dark fixed lines were later shown to be mostly atomic absorption lines, as explained by Kirchhoff and Bunsen in 1859, with the rest identified as telluric lines originating from absorption by oxygen molecules in the Earths atmosphere. These lines are still called Fraunhofer lines' in his honor; his discovery had gone far beyond the half-dozen apparent divisions in the solar spectrum that had previously been noted by Wollaston in 1802.