The Sun shows an absorption line spectrum. This is because we see the photosphere as a very hot continuum source.
Up above the photosphere lies the cooler and more tenuous (less dense) chromosphere of the Sun.
The gas absorbs out specific wavelengths, depending on the atoms and ions present in the chromosphere of the SUN (or star).