A closer look at Absorption line
Gas in front of a bright continuum can remove particular wavelengths from the beam.
The resulting dips form a pattern that depends on the atoms or ions present and on their physical conditions.
Compare several dark lines against a laboratory spectrum. A matching pattern is stronger evidence for an element than a single coincidence. For the surrounding ideas, see Emission line and Transmission spectroscopy.
Want to learn more about Absorption line? Absorption spectroscopy on Wikipedia.

