We'll see a series of bright lines with no light in between. Similarly a cold gas between us and a source of continuous light will absorb only certain energies or wavelengths of light, again identifying what's in the gas. Blackbody radiation Note that emission and absorption spectra come from thin gasses . For dense gasses, solids, and liquids, the atoms and molecules are bound together so strongly they no longer emit in discrete lines, but emit a thermal continuum of radiation or blackbody radiation . We emit as blackbodies, stars, a bar of iron in a fire, etc.
Objects emitting as blackbodies give off more energy per surface area as they get hotter.
The peak wavelength of the blackbody energy distribution also depends on the temperature of the blackbody. The hotter the blackbody, the shorter the wavelength at which it peaks. Therefore by measuring the wavelength at which a star's energy distribution peaks, we can estimate the temperature of the star itself. This Doppler shift works with light, too, allowing us to measure the velocity of a moving object if it has an emission or absorption spectrum. We know the rest wavelengths of atoms from lab measurements, we measure the wavelength that the moving object is emitting, and so we calculate its velocity.