Context. Most exoplanets detected so far are close-in planets, which are likely to be affected by tidal dissipation in their host star. To obtain a complete picture of the evolution of star–planet systems, we need to consider the effect of tides within stellar radiative and convective zones. Aims. We aim to provide a general formalism allowing us to assess tidal dissipation in stellar radiative zones for late- and early-type stars, including stellar structure with a convective core and an envelope like in F-type stars. This allows us to study the dynamics of a given system throughout the stellar evolution. On this basis, we investigate the effect of stellar structure and evolution on tidal dissipation in the radiative core of low-mass stars. Methods. We developed a general theoretical formalism to evaluate tidal dissipation in stellar radiative zones that is applicable to early- and late-type stars. From the study of adiabatic oscillations throughout the star, we computed the energy flux transported by progressive internal gravity waves and the induced tidal torque. By relying on grids of stellar models, we studied the effect of stellar structure and evolution on the tidal dissipation of F-, G-, and K-type stars from the pre-main sequence (PMS) to the red giant branch (RGB). Results. For a given star–planet system, tidal dissipation reaches a maximum value on the PMS for all stellar masses. On the main sequence (MS), it decreases to become almost constant. The dissipation is then several orders of magnitude smaller for F-type than for G- and K-type stars. During the subgiant phase and the RGB, tidal dissipation increases by several orders of magnitude, along with the expansion of the stellar envelope. We show that the dissipation of the dynamical tide in the convective zone dominates the evolution of the system during most of the PMS and the beginning of the MS, as the star rotates rapidly. Tidal dissipation in the radiative zone then becomes the strongest contribution during the subgiant phase and the RGB as the density at the convective-radiative interface increases. For similar reasons, we also find that the dissipation of a metal-poor star is stronger than the dissipation of a metal-rich star during the PMS, the subgiant phase, and the RGB. The opposite trend is observed during the MS. Finally, we show that the contribution of a convective core for the most massive solar-type stars is negligible compared to that of the envelope because the mass distribution of the core does not favor the dissipation of tidal gravity waves.