I've mentioned previously that the British Library has put over a million images into the public domain. That's a lot of images and there are some real gems amongst them. Today, via @benosteen I saw this image of stellar spectra from 1866.
CREDIT: The British Library
Although the Sun's light looks mostly white, Newton had shown that it was actually composed of all the colours of the rainbow - the spectrum. With better prisms you can see that it isn't composed of every colour; some specific colours are 'missing' from the solar spectrum and show up as narrow, dark bands. The exact wavelengths of these dark bands are due to the energy levels of specific elements in the atmosphere of the Sun and so act as a chemical fingerprint telling us what the Sun is made of.
Spectra like those shown above were first observed in 1802 by William Wollaston and the dark bands were later named "Fraunhofer lines" after German physicist Joseph von Fraunhofer. By the time this image was published (1866) they'd been known about for around half a century but had not given up all their secrets just yet. Two years later, more precise spectra of the Sun's chromosphere by Pierre Janssen and Norman Lockyer would show a yellow line with a wavelength of 587.49 nm (just next to the sodium 'D' lines) that could not be explained by any of the chemical elements known at the time. Those observations led to the discovery of the element Helium which was later named after Helios - the god of the Sun - due to the method of its discovery.
Like the Sun, other stars show dark lines in their spectra too. This stellar spectroscopy tells you a wealth of information. Not only can you tell which chemicals are present, but also their relative amounts, the star's magnetic fields and the star's history. These days we observe spectra across most of the electromagnetic spectrum from radio waves to X-rays and for a whole variety of objects. As a result we've discovered water, complex hydrocarbons, buckyballs, and even alcohol in space.