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.
- B Stars (Temperature: 11,000-30,000 K): Most of H is ionized, so only very weak H lines (not much H around with electrons to make any absorption lines).
- A Stars (Temperature: 7500-11,000 K): Ideal excitation conditions, strongest H lines.
- G Stars (Temperature: 5200-5900 K): Too cool, little excited H, so only weak H lines because the electrons are mostly in the ground state instead of the first excited state.
Credit: Terry Herter, Cornell University
http://instruct1.cit.cornell.edu/Courses/astro101/lectures/lec13.htm