Spectral Lines

Continuous spectrum
White light contains a mixture of all visible wavelengths in the electromagnetic spectrum. If the white light travels through a prism, the different wavelengths are dispersed and appear as a continuous spectrum, like that of the rainbow.

Absorption Spectrum
If the white light travels through a medium, for example, a cold gas cloud, the atoms will absorb some of the electromagnetic spectrum of the white light, and transition to a higher energy state. If then the remaining light is passed through a prism, the absorbed wavelengths will appear as dark lines on the spectrum.

Emission Spectrum
An atom in a high energy state can release electromagnetic radiation to return to a lower energy state. If the released electromagnetic radiation is passed through a prism, only the emitted wavelengths will be visible on the spectrum.