We calculate numerically the structure and evolution of pre-main-sequence stars with masses from 1 to 6 Msun. These stars are assumed to originate from protostars accreting within molecular clouds. For masses from 2 to 4 Msun, the stellar luminosity first increases markedly during a protracted epoch of nonhomologous contraction and thermal relaxation. Deuterium burns in a subsurface shell throughout this period. More massive objects are thermally relaxed from the start; they contract homologously, with fully radiative interiors. Stars with masses greater then 8 Msun have no pre-main-sequence phase, since they are already burning hydrogen by the time protostellar accretion has ended. We summarize our results by presenting a new set of evolutionary tracks in the H-R diagram.Our calculations imply that Herbig Ae and Be stars are substantially younger than previously believed. The upper boundary to their distribution in the H-R diagram is well matched by our theoretical birthline. The presence in these stars of emission lines and strong winds is not linked to an outer convection zone, since our models show that such convection always vanishes with rising effective temperature. Finally, while residual accretion from circumstellar disks may be occurring, we argue that the associated mass transfer rates are not high enough to account for the stars' observed infrared excesses.