Emission or Absorption spectra experiment is performed with
Low pressure (Rarified) gas
Remember we told you always that the spectrum was observed when we put a rarified gas in the chamber and did experiments with it.
Also if you look closely, an incandescent bulb is made of a tungsten filament which is heated to radiate light.
This light when passed through a prism to separate into constituent components gives all wavelengths and thus forms a continuous spectrum.
If we try the same with a fluorescent bulb which has a low pressure gas then we see discrete spectrum of certain wavelengths.