Solar visible light spectrum
When we look at spectral lines in a star's spectrum, we're actually looking for absorption lines, not emission lines. A star's spectrum usually resembles that of a black body, continuous and smooth. However, there are elements in the star's atmosphere that absorb some of the emitted light; these create characteristic absorption lines in the spectrum we observe.

There's a reason that a star's spectrum closely resembles that of a black body. H- opacity means that some of the solar photosphere is optically thick for a wide range of frequencies. This in turn means that the emission no longer comes from just a few frequencies corresponding to a few elements. This spectrum appears continuous, and therefore like a black body.