A closer look at Spectral class
The O, B, A, F, G, K, and M sequence orders familiar stellar spectra primarily by temperature.
The lines used for classification change as atoms and molecules respond to different atmospheric conditions.
A star with weak visible hydrogen lines need not lack hydrogen. Its temperature can make the relevant transitions less conspicuous. For the surrounding ideas, see Cecilia Payne-Gaposchkin and Stellar effective temperature.
Want to learn more about Spectral class? Stellar classification on Wikipedia.

