Here's why:
* Photosphere: This is the visible surface of the Sun. It's a relatively thin layer where the temperature and density are just right for the emission of light that we see.
* Absorption Lines: The cooler, less dense gas in the photosphere absorbs specific wavelengths of light from the hotter, deeper layers of the Sun. These absorbed wavelengths create dark lines in the continuous spectrum of light emitted by the Sun.
Think of it like this: Imagine shining a white light through a gas. Certain atoms in the gas will absorb specific colors of light, leaving dark lines in the spectrum of the light that passes through. The same principle applies to the Sun's photosphere.
Let me know if you'd like more information about the Sun's layers or spectral lines!