Astronomers have always been fascinated by the different sizes and colors of stars that they observed. In 1817 a German instrument maker named Joseph von Fraunhofer attached a spectroscope to a telescope and pointed it at the stars. He found that different stars have different absorption lines in their spectra. At first astronomers did not understand why different stars would have different absoprtion lines. Nevertheless in the early 1900s, a team of astronomers at Harvard College Observatory started a project to examine the spectra of hundreds of thousands of stars. They wanted to develop a detailed spectral classification system based on the absorption lines they were seeing. They adapted an existing spectral class system which had assigned stars a letter from A to O based on the strength of Balmer series absorption lines.
The new system reordered the classes into the order OBAFGKM where O stars are the hottest and each successive class is cooler with M being the coolest stars. Each letter was also divided into tenths of the range by adding a number 0-9 to the end. O stars are the least common and M are the most common found in the main sequence of stars. Stars near the beginning or end of their lives are not part of this classification. The new system of classification was published in the 1920s and included 225,300 stars. It was called the Henry Draper Catalogue because the funding for the project had been provided by Henry Draper.
Image credit: LucasVB, wikimedia
Much of the work on the project was done by Annie Jump Cannon, Williamina Fleming and Antonia Maury and Edward Pickering.
The spectral sequence they developed is summarized in the table below: