In the absence of any intervening material, the light from a star reaches us unobscured. When the light is dispersed into colors by a spectrograph, it may look something like this continuous spectrum, which has a smooth, gradual change of color.
However, if there is a gas cloud between us and the star, the interstellar medium absorbs some of the light before it reaches us. Depending upon which types of atoms or molecules are present in the absorbing gas cloud, a set of dark features, or absorption lines, is superimposed on the continuous spectrum emitted by the star.
These absorption lines contain information about the composition of the cloud and the kinds of atoms and molecules in the gas. They also tell us how much gas is in the cloud, the temperature of the gas, how fast it is moving toward or away from us, whether there are cold regions embedded in warmer material, and whether there are interstellar dust grains mixed in with the gas. These absorption features can be thought of as cosmic barcodes, with each type of atom or molecule having a different barcode signature.
One can think of the spectrograph as a "barcode reader". Once the barcode produced by the gas cloud has been read, astronomers can interpret what the barcode means. Here are examples of the types of barcodes that will be produced by the Far Ultraviolet Spectroscopic Explorer (FUSE) mission, which will observe light having wavelengths between 900 and 1200 nanometers (1 nanometer = 1 billionth of a meter).
Now, see if you can guess which elements have left their mark on this spectrum:
When you think you know, check for the correct Answer.