The OBAFGKM sequence
Stars are placed into spectral classes according to the pattern of absorption lines in their spectra. The main A-level sequence is O, B, A, F, G, K, M from hottest to coolest.