Hipparcos trigonometric parallaxes and observational data for open clusters are used to determine the absolute magnitudes M V of O and B stars of various spectral subtypes and luminosity classes, including those with broadened lines and hydrogen emission lines. The same data are used to derive a relation between M V and the index β of the Strömgren photometric system. The resulting calibrations and the spectroscopic-parallax method are used to determine the distances to young open clusters.