spectral classification of a star into the lettered categories o b a f g k and m is carried out by
Stellar classification Most stars are currently classified under the Morganâ€“Keenan (MK) system using the letters O, B, A, F, G, K, and M, a sequence from the hottest (O type) to the coolest (M type). Each letter class is then subdivided using a numeric digit with 0 being hottest and 9 being coolest (e.g. A8, A9, F0, F1 form a sequence from hotter to cooler). The sequence has been expanded with classes for other stars and star-like objects that do not fit in the classical system, such as class D for white dwarfs and class C for carbon stars.
Pre-main-sequence star The energy source of PMS objects is gravitational contraction, as opposed to hydrogen burning in main-sequence stars. In the Hertzsprung–Russell diagram, pre-main-sequence stars with more than 0.5 M☉ first move vertically downward along Hayashi tracks, then leftward and horizontally along Henyey tracks, until they finally halt at the main sequence. Pre-main-sequence stars with less than 0.5 M☉ contract vertically along the Hayashi track for their entire evolution.