Absorption lines are produced by cool gas in the atmosphere of the Sun.

Not really cool, but cooler than inside of the sun.