Figure: Schematic Spectra of Star

Almost all stars show a "continuum" spectum with "absorption" lines. Some stars show "emission" lines. All stars do not have the same spectrum!

Example: Hydrogen Lines (Credit: http://www.astronomy.ohio-state.edu/%7Epogge/Ast162/Unit1/sptypes.html )

The Hydrogen absorption lines in the part of the spectrum at visible wavelengths all arise from H atoms with the electron in first excited state. The hydrogen Balmer spectrum is visible for most stars.



Credit: Terry Herter, Cornell University

http://instruct1.cit.cornell.edu/Courses/astro101/lectures/lec13.htm