I have recently started to study astronomy and there is a thing with stellar classifications I can't get my head around: The colder the star the more absorption lines from metals are present in its spectrum. For instance, class B has lines from hydrogen and helium, while F has absorption lines from calcium. How comes? Isn't hotter stars the ones which can fuse heavier elements?
The surface temperature of the star has no direct bearing on its metal content. Most stars in the immediate vicinity of the Sun have a very similar metal content. What you are talking about is how this metal content affects the observed spectrum of the star.
If the star's photosphere is very hot then the metals become ionised and you don't see the (for instance) absorption lines caused by neutral iron atoms, or possibly even singly ionised atoms, because there aren't any in the photosphere. Significant atomic hydrogen and helium can still be present at higher temperatures - hence absorption lines of hydrogen and helium are seen in hotter stars.
In cooler stars, most of the photospheric metals are in atomic form (or even in molecular form if temperatures fall below 4000K) and hence we see strong atomic absorption features in their spectra.