What causes the relative strength of hydrogen absorption lines in stars? Every star has it's own spectral classification due to its spectrum. For example, $F, G, K$ and $M$ stars have a calcium absorption line due to the calcium in the star. 
As far as I know, all stars have hydrogen. However, the $H_{\alpha}$ line is much stronger in type $A$ stars than in $O$ stars (which are hotter than $A$).
How is this possible?
I guess it's something related to temperature ($O$ ionize hydrogen first?) but I'm not sure.
 A: The spectral absorption lines which are used to classify stars are present in the spectrum of the star's photosphere.  The $H_{\alpha}$ line is a member of the Balmer series of hydrogen transitions, specifically the $n=3\to n=2$ transition. In order to have this line there must be a population of neutral hydrogen atoms in the photophere in the $n=2$ state which get lifted energetically to a higher state and eventually get to $n=3$, then transition to $n=2$. 
As the temperature of the photosphere increases, the fraction of neutral atoms in $n=2$ increases. On the other hand, if the temperature is gets too high, the total number of neutral hydrogen atoms decreases (more hydrogen is ionized). So, there is a peak in the intensity of the $H_{\alpha}$ line because of the competing temperature processes. 
That peak is right around 10000 K, and those stars which have photospheric temperatures around 9000-11000 K were labelled $A$-type stars because they had the strongest $H_{\alpha}$ lines. The $O$-type stars, under the original Pickering-Fleming scheme were far down the alphabetic classification because of the extremely weak $H_{\alpha}$ lines. Later, Annie J. Cannon re-ordered the letters based on temperature, with $O$ being the hottest. The photosphere temperature of $O$ stars is so hot that little neutral hydrogen is present, so there are very few Balmer transitions (or other hydrogen for that matter). But a large population of neutral helium atoms is present, so the helium spectral lines are strong in $O$ stars.
