The pre-main-sequence evolution of intermediate-mass stars