A Landau-Ginsburg-Devonshire-type thermodynamic theory is used to describe equilibrium single-domain states and phase transitions in epitaxial ferroelectric thin films. For BaTiO3 and PbTiO3 films grown on cubic substrates, the paraelectric to ferroelectric phase transition is found to be of the second order, irrespective of the lattice misfit. The temperature-misfit strain phase diagrams are developed for these films. The existence of a "monoclinic gap" separating the stability ranges of low-temperature tetragonal and orthorhombic stales is predicted. Anomalies of the dielectric response associated with the phase transitions in epitaxial films are also discussed.