white light is passed through the vapour of an element, certain wavelengths will be absorbed by the atoms and removed from the light as they make the electron gain energy and jump to an excited state. the difference in energy corresponds to frequency and wave length