I found a couple of websites to help you revise the emission and absorption of specific colours of light by different elements.
There is an interactive challenge to see if you can work out which elements are present in different stars.
Another test on line spectra here.
A diagram showing how absoption removes different parts of a star’s spectrum.